| 1 |
#ifndef __CMPH_STRUCTS_H__ |
| 2 |
#define __CMPH_STRUCTS_H__ |
| 3 |
|
| 4 |
#include "cmph.h" |
| 5 |
|
| 6 |
/** Hash generation algorithm data |
| 7 |
*/ |
| 8 |
struct __config_t |
| 9 |
{ |
| 10 |
CMPH_ALGO algo; |
| 11 |
cmph_io_adapter_t *key_source; |
| 12 |
cmph_uint32 verbosity; |
| 13 |
double c; |
| 14 |
void *data; // algorithm dependent data |
| 15 |
}; |
| 16 |
|
| 17 |
/** Hash querying algorithm data |
| 18 |
*/ |
| 19 |
struct __cmph_t |
| 20 |
{ |
| 21 |
CMPH_ALGO algo; |
| 22 |
cmph_uint32 size; |
| 23 |
cmph_io_adapter_t *key_source; |
| 24 |
void *data; // algorithm dependent data |
| 25 |
}; |
| 26 |
|
| 27 |
cmph_config_t *__config_new(cmph_io_adapter_t *key_source); |
| 28 |
void __config_destroy(cmph_config_t*); |
| 29 |
void __cmph_dump(cmph_t *mphf, FILE *); |
| 30 |
cmph_t *__cmph_load(FILE *f); |
| 31 |
|
| 32 |
|
| 33 |
#endif |