ccl/hash/ccl_murmur_hash.h
static ccl_uint64_t ccl_murmur_hash_64a(const void *key, ccl_uint64_t len, ccl_uint64_t seed)
{
    const ccl_uint64_t m = CCL_MURMUR_BIG_CONSTANT(0xc6a4a7935bd1e995);
    const int r = 47;
    ccl_uint64_t h = seed ^ (len * m);
    const ccl_uint64_t *data = (const ccl_uint64_t*) key;
    const ccl_uint64_t *end = data + (len / 8);
    ccl_uint64_t k;
    const unsigned char *data2;

    while (data != end)
    {
        k = *data++;

        k *= m; 
        k ^= k >> r; 
        k *= m; 
        
        h ^= k;
        h *= m; 
    }

    data2 = (const unsigned char*) data;

    switch (len & 7)
    {
        case 7: h ^= ccl_uint64_t(data2[6]) << 48;
        case 6: h ^= ccl_uint64_t(data2[5]) << 40;
        case 5: h ^= ccl_uint64_t(data2[4]) << 32;
        case 4: h ^= ccl_uint64_t(data2[3]) << 24;
        case 3: h ^= ccl_uint64_t(data2[2]) << 16;
        case 2: h ^= ccl_uint64_t(data2[1]) << 8;
        case 1: h ^= ccl_uint64_t(data2[0]);
            h *= m;
    };
 
    h ^= h >> r;
    h *= m;
    h ^= h >> r;
    return h;
}
// 64-bit hash for 64-bit platforms
64-bit hash for 64-bit platforms
64 - bit hash for 64 - bit platforms
static ccl_uint64_t ccl_murmur_hash_64a(const void *key, ccl_uint64_t len, ccl_uint64_t seed)
{
    const ccl_uint64_t m = CCL_MURMUR_BIG_CONSTANT(0xc6a4a7935bd1e995);
    const int r = 47;
    ccl_uint64_t h = seed ^ (len * m);
    const ccl_uint64_t *data = (const ccl_uint64_t*) key;
    const ccl_uint64_t *end = data + (len / 8);
    ccl_uint64_t k;
    const unsigned char *data2;
    while (data != end)
    {
        k = *data++;
        k *= m; 
        k ^= k >> r; 
        k *= m; 
        h ^= k;
        h *= m; 
    }
    data2 = (const unsigned char*) data;
    switch (len & 7)
    {
        case 7: h ^= ccl_uint64_t(data2[6]) << 48;
        case 6: h ^= ccl_uint64_t(data2[5]) << 40;
        case 5: h ^= ccl_uint64_t(data2[4]) << 32;
        case 4: h ^= ccl_uint64_t(data2[3]) << 24;
        case 3: h ^= ccl_uint64_t(data2[2]) << 16;
        case 2: h ^= ccl_uint64_t(data2[1]) << 8;
        case 1: h ^= ccl_uint64_t(data2[0]);
            h *= m;
    };
    h ^= h >> r;
    h *= m;
    h ^= h >> r;
    return h;
}
static ccl_uint64_t ccl_murmur_hash_64a ( const void * key , ccl_uint64_t len , ccl_uint64_t seed ) { const ccl_uint64_t m = CCL_MURMUR_BIG_CONSTANT ( 0xc6a4a7935bd1e995 ) ; const int r = 47 ; ccl_uint64_t h = seed ^ ( len * m ) ; const ccl_uint64_t * data = ( const ccl_uint64_t * ) key ; const ccl_uint64_t * end = data + ( len / 8 ) ; ccl_uint64_t k ; const unsigned char * data2 ; while ( data != end ) { k = * data ++ ; k *= m ; k ^= k >> r ; k *= m ; h ^= k ; h *= m ; } data2 = ( const unsigned char * ) data ; switch ( len & 7 ) { case 7 : h ^= ccl_uint64_t ( data2 [ 6 ] ) << 48 ; case 6 : h ^= ccl_uint64_t ( data2 [ 5 ] ) << 40 ; case 5 : h ^= ccl_uint64_t ( data2 [ 4 ] ) << 32 ; case 4 : h ^= ccl_uint64_t ( data2 [ 3 ] ) << 24 ; case 3 : h ^= ccl_uint64_t ( data2 [ 2 ] ) << 16 ; case 2 : h ^= ccl_uint64_t ( data2 [ 1 ] ) << 8 ; case 1 : h ^= ccl_uint64_t ( data2 [ 0 ] ) ; h *= m ; } ; h ^= h >> r ; h *= m ; h ^= h >> r ; return h ; }
64-bit hash for 64-bit platforms
64 - bit hash for 64 - bit platforms