@@ -122,7 +122,7 @@ template <typename HashFamily>
122122struct FilterAPI <SimdBlockFilterFixed<HashFamily>> {
123123 using Table = SimdBlockFilterFixed<HashFamily>;
124124 static Table ConstructFromAddCount (size_t add_count) {
125- Table ans (ceil ( add_count * 8.0 / CHAR_BIT) );
125+ Table ans (add_count);
126126 return ans;
127127 }
128128 static void Add (uint64_t key, Table* table) {
@@ -146,7 +146,7 @@ template <typename HashFamily>
146146struct FilterAPI <SimdBlockFilter<HashFamily>> {
147147 using Table = SimdBlockFilter<HashFamily>;
148148 static Table ConstructFromAddCount (size_t add_count) {
149- Table ans (ceil (log2 (add_count * 8.0 / CHAR_BIT )));
149+ Table ans (ceil (log2 (add_count)));
150150 return ans;
151151 }
152152 static void Add (uint64_t key, Table* table) {
@@ -167,7 +167,7 @@ template <typename HashFamily>
167167struct FilterAPI <SimdBlockFilterFixed64<HashFamily>> {
168168 using Table = SimdBlockFilterFixed64<HashFamily>;
169169 static Table ConstructFromAddCount (size_t add_count) {
170- Table ans (ceil ( add_count * 8.0 / CHAR_BIT) );
170+ Table ans (add_count);
171171 return ans;
172172 }
173173 static void Add (uint64_t key, Table* table) {
@@ -188,7 +188,7 @@ template <typename HashFamily>
188188struct FilterAPI <SimdBlockFilterFixed<HashFamily>> {
189189 using Table = SimdBlockFilterFixed<HashFamily>;
190190 static Table ConstructFromAddCount (size_t add_count) {
191- Table ans (ceil ( add_count * 8.0 / CHAR_BIT) );
191+ Table ans (add_count);
192192 return ans;
193193 }
194194 static void Add (uint64_t key, Table* table) {
@@ -211,7 +211,7 @@ template <typename HashFamily>
211211struct FilterAPI <SimdBlockFilterFixed16<HashFamily>> {
212212 using Table = SimdBlockFilterFixed16<HashFamily>;
213213 static Table ConstructFromAddCount (size_t add_count) {
214- Table ans (ceil ( add_count * 8.0 / CHAR_BIT) );
214+ Table ans (add_count);
215215 return ans;
216216 }
217217 static void Add (uint64_t key, Table* table) {
@@ -725,7 +725,7 @@ template<size_t blocksize, int k, typename HashFamily>
725725struct FilterAPI <SimpleBlockFilter<blocksize,k,HashFamily>> {
726726 using Table = SimpleBlockFilter<blocksize,k,HashFamily>;
727727 static Table ConstructFromAddCount (size_t add_count) {
728- Table ans (ceil ( add_count * 8.0 / CHAR_BIT) );
728+ Table ans (add_count);
729729 return ans;
730730 }
731731 static void Add (uint64_t key, Table* table) {
0 commit comments