summaryrefslogtreecommitdiffstats
path: root/include/util/bf_config.h
diff options
context:
space:
mode:
authorDouglas B. Rumbaugh <dbr4@psu.edu>2024-02-09 14:06:59 -0500
committerGitHub <noreply@github.com>2024-02-09 14:06:59 -0500
commitbc0f3cca3a5b495fcae1d3ad8d09e6d714da5d30 (patch)
tree66333c55feb0ea8875a50e6dc07c8535d241bf1c /include/util/bf_config.h
parent076e104b8672924c3d80cd1da2fdb5ebee1766ac (diff)
parent46885246313358a3b606eca139b20280e96db10e (diff)
downloaddynamic-extension-bc0f3cca3a5b495fcae1d3ad8d09e6d714da5d30.tar.gz
Merge pull request #1 from dbrumbaugh/new-buffer
Initial Concurrency Implementation
Diffstat (limited to 'include/util/bf_config.h')
-rw-r--r--include/util/bf_config.h23
1 files changed, 20 insertions, 3 deletions
diff --git a/include/util/bf_config.h b/include/util/bf_config.h
index 2390643..9f29ed7 100644
--- a/include/util/bf_config.h
+++ b/include/util/bf_config.h
@@ -1,25 +1,42 @@
/*
* 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.
+ * Distributed under the Modified BSD License.
+ *
+ * Global parameters for configuring bloom filters used as auxiliary
+ * structures on shards within the framework. The bloom filter class
+ * can be found in
+ *
+ * $PROJECT_ROOT/external/psudb-common/cpp/include/psu-ds/BloomFilter.h
*
*/
#pragma once
-#include "psu-util/alignment.h"
+#include <cstdlib>
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;
}