From d2279e1b96d352a0af1d425dcaaf93e8a26a8d52 Mon Sep 17 00:00:00 2001 From: Douglas Rumbaugh Date: Mon, 30 Oct 2023 17:15:05 -0400 Subject: General Comment + Consistency updates --- include/util/bf_config.h | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'include/util/bf_config.h') 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 + * Copyright (C) 2023 Douglas B. Rumbaugh * Dong Xie * * 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; } -- cgit v1.2.3 From 357cab549c2ed33970562b84ff6f83923742343d Mon Sep 17 00:00:00 2001 From: Douglas Rumbaugh Date: Tue, 7 Nov 2023 15:34:24 -0500 Subject: Comment and License updates --- include/util/bf_config.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/util/bf_config.h') diff --git a/include/util/bf_config.h b/include/util/bf_config.h index 4de465d..fdf2195 100644 --- a/include/util/bf_config.h +++ b/include/util/bf_config.h @@ -4,10 +4,10 @@ * Copyright (C) 2023 Douglas B. Rumbaugh * Dong Xie * - * 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 filters themselves + * 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 -- cgit v1.2.3 From 402fc269c0aaa671d84a6d15918735ad4b90e6b2 Mon Sep 17 00:00:00 2001 From: Douglas Rumbaugh Date: Fri, 9 Feb 2024 12:30:21 -0500 Subject: Comment updates/fixes --- include/util/bf_config.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include/util/bf_config.h') diff --git a/include/util/bf_config.h b/include/util/bf_config.h index fdf2195..9f29ed7 100644 --- a/include/util/bf_config.h +++ b/include/util/bf_config.h @@ -15,7 +15,7 @@ */ #pragma once -#include "psu-util/alignment.h" +#include namespace de { @@ -30,7 +30,6 @@ static size_t BF_HASH_FUNCS = 7; * (0, 1), or the behavior of bloom filters is undefined. */ static void BF_SET_FPR(double fpr) { - BF_FPR = fpr; } -- cgit v1.2.3