blob: 17727acb482b5428ec256e007e5a739d0ac83495 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
/*-
* Copyright (c) 2008-2013 WiredTiger, Inc.
* All rights reserved.
*
* See the file LICENSE for redistribution information.
*/
/*
* REFERENCES:
* http://www.eecs.harvard.edu/~kirsch/pubs/bbbf/esa06.pdf
* http://code.google.com/p/cityhash-c/
*/
struct __wt_bloom {
const char *uri;
char *config;
uint8_t *bitstring; /* For in memory representation. */
WT_SESSION_IMPL *session;
WT_CURSOR *c;
uint32_t k; /* The number of hash functions used. */
uint32_t factor; /* The number of bits per item inserted. */
uint64_t m; /* The number of slots in the bit string. */
uint64_t n; /* The number of items to be inserted. */
};
struct __wt_bloom_hash {
uint64_t h1, h2; /* The two hashes used to calculate bits. */
};
|