diff options
author | Eliot Horowitz <eliot@10gen.com> | 2014-11-04 15:46:40 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2014-11-05 11:21:19 -0500 |
commit | 5ca2daf551a2c631a5f573cb054406f5d49fbef5 (patch) | |
tree | b0a23d34ffdb376bac0b79ed17b5619cfc0d9b47 /src/third_party/wiredtiger/src/include/bloom.h | |
parent | 017704acdfc7517efadb3fab167bba06c025c01a (diff) | |
download | mongo-5ca2daf551a2c631a5f573cb054406f5d49fbef5.tar.gz |
SERVER-15953: add wiredtiger to third_party
Diffstat (limited to 'src/third_party/wiredtiger/src/include/bloom.h')
-rw-r--r-- | src/third_party/wiredtiger/src/include/bloom.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/third_party/wiredtiger/src/include/bloom.h b/src/third_party/wiredtiger/src/include/bloom.h new file mode 100644 index 00000000000..4ae6d96b935 --- /dev/null +++ b/src/third_party/wiredtiger/src/include/bloom.h @@ -0,0 +1,28 @@ +/*- + * Copyright (c) 2008-2014 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. */ +}; |