Branch to refactor and debug (AVLs bugged)
This commit is contained in:
15
src/bloom.h
15
src/bloom.h
@ -9,6 +9,10 @@
|
||||
#define _BLOOM_H
|
||||
|
||||
|
||||
// TODO
|
||||
#define BLOOM_FILTER_ERROR_RATE (0.001)
|
||||
|
||||
|
||||
/** ***************************************************************************
|
||||
* On Linux, the code attempts to compute a bucket size based on CPU cache
|
||||
* size info, if available. If that fails for any reason, this fallback size
|
||||
@ -60,10 +64,17 @@ struct bloom
|
||||
unsigned bucket_bits_fast_mod_operand;
|
||||
|
||||
double bpe;
|
||||
unsigned char * bf;
|
||||
int ready;
|
||||
|
||||
unsigned char bf[];
|
||||
};
|
||||
|
||||
typedef struct bloom bloom_t;
|
||||
|
||||
|
||||
// TODO
|
||||
int bloom_filter_size(int entries, double error);
|
||||
|
||||
|
||||
/** ***************************************************************************
|
||||
* Initialize the bloom filter for use.
|
||||
@ -91,7 +102,7 @@ struct bloom
|
||||
* 1 - on failure
|
||||
*
|
||||
*/
|
||||
int bloom_init(struct bloom * bloom, int entries, double error);
|
||||
int bloom_init(struct bloom * bloom, int entries); //, double error);
|
||||
|
||||
|
||||
/** ***************************************************************************
|
||||
|
Reference in New Issue
Block a user