25 #ifndef OPIC_HASH_OP_HASH_H 26 #define OPIC_HASH_OP_HASH_H 1 28 #include "opic/common/op_macros.h" 45 typedef uint64_t(*
OPHash)(
void* key,
size_t size);
60 size_t keysize,
size_t valsize,
72 return cityhash64((
const uint8_t*)key, size);
93 size_t keysize,
size_t valsize,
94 size_t ctxsize,
bool is_duplicate);
108 size_t keysize,
size_t valsize,
123 size_t keysize,
size_t valsize,
128 typedef union FunnelCB
133 } FunnelCB __attribute__((__transparent_union__));
void(* OPFunnelDeleteCB)(void *key, void *value, void *ctx, size_t keysize, size_t valsize, size_t ctxsize)
Callback type for doing delete operation with funnel.
static uint64_t OPDefaultHash(void *key, size_t size)
Default hash function.
void(* OPFunnelUpsertCB)(void *key, void *table_value, void *funnel_value, void *ctx, size_t keysize, size_t valsize, size_t ctxsize, bool is_duplicate)
Callback type for doing upsert operation with funnel.
void(* OPFunnelGetCB)(void *key, void *value, void *ctx, size_t keysize, size_t valsize, size_t ctxsize)
Callback type for doing get operation with funnel.
void(* OPHashIterator)(void *key, void *value, size_t keysize, size_t valsize, void *context)
HashTable iterator interface.
uint64_t(* OPHash)(void *key, size_t size)
Hash function interface.