File: murmurhash.pxd

package info (click to toggle)
scikit-learn 0.11.0-2%2Bdeb7u1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 13,900 kB
  • sloc: python: 34,740; ansic: 8,860; cpp: 8,849; pascal: 230; makefile: 211; sh: 14
file content (19 lines) | stat: -rw-r--r-- 714 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
"""Export fast murmurhash C/C++ routines + cython wrappers"""

cimport numpy as np

cdef extern from "MurmurHash3.h":
    void MurmurHash3_x86_32(void* key, int len, unsigned int seed,
                            void* out)

    void MurmurHash3_x86_128(void* key, int len, unsigned int seed,
                             void* out)

    void MurmurHash3_x64_128(void* key, int len, unsigned int seed,
                             void* out)


cpdef np.uint32_t murmurhash3_int_u32(int key, unsigned int seed)
cpdef np.int32_t murmurhash3_int_s32(int key, unsigned int seed)
cpdef np.uint32_t murmurhash3_bytes_u32(bytes key, unsigned int seed)
cpdef np.int32_t murmurhash3_bytes_s32(bytes key, unsigned int seed)