GraphLab: Distributed Graph-Parallel API  2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
integer_mix.hpp
1 #ifndef GRAPHLAB_INTEGER_MIX_HPP
2 #define GRAPHLAB_INTEGER_MIX_HPP
3 #include <stdint.h>
4 namespace graphlab {
5 // Jenkin's 32 bit integer mix from
6 // http://burtleburtle.net/bob/hash/integer.html
7 inline uint32_t integer_mix(uint32_t a) {
8  a -= (a<<6);
9  a ^= (a>>17);
10  a -= (a<<9);
11  a ^= (a<<4);
12  a -= (a<<3);
13  a ^= (a<<10);
14  a ^= (a>>15);
15  return a;
16 }
17 
18 }
19 #endif
20