diff --git a/README.md b/README.md index c11eb5c7d..26d71870e 100644 --- a/README.md +++ b/README.md @@ -242,4 +242,11 @@ We plan to add many GPU-accelerated, concurrent data structures to `cuCollection - [Host-bulk APIs](https://github.com/NVIDIA/cuCollections/blob/dev/examples/hyperloglog/host_bulk_example.cu) (see [live example in godbolt](https://godbolt.org/z/G4qdcTezE)) - [Device-ref APIs](https://github.com/NVIDIA/cuCollections/blob/dev/examples/hyperloglog/device_ref_example.cu) (see [live example in godbolt](https://godbolt.org/z/n88713o4n)) +### `bloom_filter` + +`cuco::bloom_filter` implements a Blocked Bloom Filter for approximate set membership queries. + +#### Examples: +- [Host-bulk APIs](https://github.com/NVIDIA/cuCollections/blob/dev/examples/bloom_filter/host_bulk_example.cu) (see [live example in godbolt](https://godbolt.org/z/EY7T5v5aE)) + diff --git a/benchmarks/CMakeLists.txt b/benchmarks/CMakeLists.txt index 56205692e..27b858898 100644 --- a/benchmarks/CMakeLists.txt +++ b/benchmarks/CMakeLists.txt @@ -98,3 +98,9 @@ ConfigureBench(HASH_FUNCTION_BENCH # - hyperloglog benchmarks ----------------------------------------------------------- ConfigureBench(HYPERLOGLOG_BENCH hyperloglog/hyperloglog_bench.cu) + +################################################################################################### +# - bloom_filter benchmarks ----------------------------------------------------------------------- +ConfigureBench(BLOOM_FILTER_BENCH + bloom_filter/add_bench.cu + bloom_filter/contains_bench.cu) diff --git a/benchmarks/benchmark_defaults.hpp b/benchmarks/benchmark_defaults.hpp index c01e21ca8..1d689d55a 100644 --- a/benchmarks/benchmark_defaults.hpp +++ b/benchmarks/benchmark_defaults.hpp @@ -16,6 +16,8 @@ #pragma once +#include + #include #include @@ -25,6 +27,12 @@ namespace cuco::benchmark::defaults { using KEY_TYPE_RANGE = nvbench::type_list; using VALUE_TYPE_RANGE = nvbench::type_list; +using HASH_RANGE = nvbench::type_list, + cuco::xxhash_32, + cuco::xxhash_64, + cuco::murmurhash3_32>; //, +// cuco::murmurhash3_x86_128, +// cuco::murmurhash3_x64_128>; // TODO handle tuple-like hash value auto constexpr N = 100'000'000; auto constexpr OCCUPANCY = 0.5; diff --git a/benchmarks/benchmark_utils.hpp b/benchmarks/benchmark_utils.hpp index 392cafe06..680345ebe 100644 --- a/benchmarks/benchmark_utils.hpp +++ b/benchmarks/benchmark_utils.hpp @@ -39,6 +39,17 @@ auto dist_from_state(nvbench::state const& state) } } +template +struct rebind_hasher; + +template