Go to the documentation of this file.00001 #ifndef _CRUSH_HASH_H
00002 #define _CRUSH_HASH_H
00003
00004 #include<stdint.h>
00005 #include "Distributor.h"
00006
00007 #define CRUSH_HASH_RJENKINS1 0
00008
00009 #define CRUSH_HASH_DEFAULT CRUSH_HASH_RJENKINS1
00010
00011 extern const char *crush_hash_name(int type);
00012
00013
00014
00015
00016
00017
00018
00019
00020 uint64_t disthash(VDRIVE::Distributor *crush_dist, int64_t key1);
00021 uint64_t disthash_2(VDRIVE::Distributor *crush_dist, int64_t key1, int64_t key2);
00022 uint64_t disthash_3(VDRIVE::Distributor *crush_dist, int64_t key1, int64_t key2, int64_t key3);
00023 uint64_t disthash_4(VDRIVE::Distributor *crush_dist, int64_t key1, int64_t key2, int64_t key3, int64_t key4);
00024 uint64_t disthash_5(VDRIVE::Distributor *crush_dist, int64_t key1, int64_t key2, int64_t key3, int64_t key4, int64_t key5);
00025
00026
00027 #endif