diff options
| author | Douglas Rumbaugh <dbr4@psu.edu> | 2023-10-30 17:15:05 -0400 |
|---|---|---|
| committer | Douglas Rumbaugh <dbr4@psu.edu> | 2023-10-30 17:15:05 -0400 |
| commit | d2279e1b96d352a0af1d425dcaaf93e8a26a8d52 (patch) | |
| tree | 4e8df98339ff5578deb8f8be46b9f6c3cc34cef4 /include/util/bf_config.h | |
| parent | 8ce1cb0eef7d5631f0f7788804845ddc8296ac6f (diff) | |
| download | dynamic-extension-d2279e1b96d352a0af1d425dcaaf93e8a26a8d52.tar.gz | |
General Comment + Consistency updates
Diffstat (limited to 'include/util/bf_config.h')
| -rw-r--r-- | include/util/bf_config.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/include/util/bf_config.h b/include/util/bf_config.h index 2390643..4de465d 100644 --- a/include/util/bf_config.h +++ b/include/util/bf_config.h @@ -1,11 +1,17 @@ /* * include/util/bf_config.h * - * Copyright (C) 2023 Douglas Rumbaugh <drumbaugh@psu.edu> + * Copyright (C) 2023 Douglas B. Rumbaugh <drumbaugh@psu.edu> * Dong Xie <dongx@psu.edu> * * All rights reserved. Published under the Modified BSD License. * + * Global parameters for configuring bloom filters used as auxiliary + * structures on shards within the framework. The bloom filters themselves + * can be found in + * + * $PROJECT_ROOT/external/psudb-common/cpp/include/psu-ds/BloomFilter.h + * */ #pragma once @@ -13,13 +19,25 @@ namespace de { +/* global variable for specifying bloom filter FPR */ static double BF_FPR = .01; + +/* global variable for specifying number of BF hash functions (k) */ static size_t BF_HASH_FUNCS = 7; +/* + * Adjust the value of BF_FPR. The argument must be on the interval + * (0, 1), or the behavior of bloom filters is undefined. + */ static void BF_SET_FPR(double fpr) { + BF_FPR = fpr; } +/* + * Adjust the value of BF_HASH_FUNCS. The argument must be on the interval + * (0, INT64_MAX], or the behavior of bloom filters is undefined. + */ static void BF_SET_HASHFUNC(size_t func_cnt) { BF_HASH_FUNCS = func_cnt; } |