File: murmurhash.pxd

package info (click to toggle)
scikit-learn 1.4.2%2Bdfsg-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 25,036 kB
  • sloc: python: 201,105; cpp: 5,790; ansic: 854; makefile: 304; sh: 56; javascript: 20
file content (21 lines) | stat: -rw-r--r-- 864 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
"""Export fast murmurhash C/C++ routines + cython wrappers"""

cimport numpy as cnp

# The C API is disabled for now, since it requires -I flags to get
# compilation to work even when these functions are not used.
# 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 cnp.uint32_t murmurhash3_int_u32(int key, unsigned int seed)
cpdef cnp.int32_t murmurhash3_int_s32(int key, unsigned int seed)
cpdef cnp.uint32_t murmurhash3_bytes_u32(bytes key, unsigned int seed)
cpdef cnp.int32_t murmurhash3_bytes_s32(bytes key, unsigned int seed)