From fc1a33a205d8ded47c933fe2d2c4a0a9b454a4d3 Mon Sep 17 00:00:00 2001 From: Douglas Rumbaugh Date: Tue, 13 Jun 2023 13:56:28 -0400 Subject: TrieSpline: parameterized TrieSpline template with max error --- include/shard/TrieSpline.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'include/shard/TrieSpline.h') diff --git a/include/shard/TrieSpline.h b/include/shard/TrieSpline.h index 1588507..432614c 100644 --- a/include/shard/TrieSpline.h +++ b/include/shard/TrieSpline.h @@ -27,8 +27,6 @@ namespace de { -size_t g_max_error = 1024; - template struct ts_range_query_parms { decltype(R::key) lower_bound; @@ -55,7 +53,7 @@ struct TrieSplineBufferState { }; -template +template class TrieSpline { private: typedef decltype(R::key) K; @@ -85,7 +83,7 @@ public: K min_key = base->rec.key; K max_key = (stop - 1)->rec.key; - auto bldr = ts::Builder(min_key, max_key, g_max_error); + auto bldr = ts::Builder(min_key, max_key, E); while (base < stop) { if (!(base->is_tombstone()) && (base + 1) < stop) { @@ -159,7 +157,7 @@ public: } m_bf = new BloomFilter(BF_FPR, tombstone_count, BF_HASH_FUNCS); - auto bldr = ts::Builder(m_min_key, m_max_key, g_max_error); + auto bldr = ts::Builder(m_min_key, m_max_key, E); size_t alloc_size = (attemp_reccnt * sizeof(Wrapped)) + (CACHELINE_SIZE - (attemp_reccnt * sizeof(Wrapped)) % CACHELINE_SIZE); assert(alloc_size % CACHELINE_SIZE == 0); -- cgit v1.2.3