MCPcopy Create free account
hub / github.com/numpy/numpy / rk_hash

Function rk_hash

numpy/random/src/mt19937/randomkit.c:159–167  ·  view source on GitHub ↗

Thomas Wang 32 bits integer hash function */

Source from the content-addressed store, hash-verified

157
158/* Thomas Wang 32 bits integer hash function */
159unsigned long rk_hash(unsigned long key) {
160 key += ~(key << 15);
161 key ^= (key >> 10);
162 key += (key << 3);
163 key ^= (key >> 6);
164 key += ~(key << 11);
165 key ^= (key >> 16);
166 return key;
167}
168
169rk_error rk_randomseed(rk_state *state) {
170#ifndef _WIN32

Callers 1

rk_randomseedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected