|
GPU-Accelerated Cuckoo Filter
|
A multi-GPU implementation of the Cuckoo Filter. More...
Classes | |
| struct | Partitioner |
| Functor for partitioning keys across GPUs. More... | |
Public Types | |
| using | T = typename Config::KeyType |
Public Member Functions | |
| FilterMultiGPU (size_t numGPUs, size_t capacity, float memFactor=defaultMemoryFactor) | |
| Constructs a new FilterMultiGPU with default transfer plan. | |
| FilterMultiGPU (size_t numGPUs, size_t capacity, const char *transferPlanPath, float memFactor=defaultMemoryFactor) | |
| Constructs a new FilterMultiGPU with custom transfer plan. | |
| ~FilterMultiGPU () | |
| Destroys the FilterMultiGPU. | |
| FilterMultiGPU (const FilterMultiGPU &)=delete | |
| FilterMultiGPU & | operator= (const FilterMultiGPU &)=delete |
| size_t | insertMany (const T *h_keys, size_t n, bool *h_output=nullptr) |
| Inserts a batch of keys into the distributed filter. | |
| void | containsMany (const T *h_keys, size_t n, bool *h_output) |
| Checks for the presence of multiple keys in the filter. | |
| size_t | deleteMany (const T *h_keys, size_t n, bool *h_output=nullptr) |
| Deletes multiple keys from the filter. | |
| float | loadFactor () const |
| Calculates the global load factor. | |
| template<typename Func > | |
| void | parallelForGPUs (Func func) const |
| Executes a function in parallel across all GPUs. | |
| void | synchronizeAllGPUs () |
| Synchronizes all GPU streams used by this filter. | |
| size_t | totalOccupiedSlots () const |
| Returns the total number of occupied slots across all GPUs. | |
| void | clear () |
| Clears all filters on all GPUs. | |
| size_t | totalCapacity () const |
| Returns the total capacity of the distributed filter. | |
| size_t | sizeInBytes () const |
| size_t | insertMany (const thrust::host_vector< T > &h_keys, thrust::host_vector< bool > &h_output) |
| Inserts keys from a Thrust host vector. | |
| size_t | insertMany (const thrust::host_vector< T > &h_keys, thrust::host_vector< uint8_t > &h_output) |
| Inserts keys from a Thrust host vector (uint8_t output). | |
| size_t | insertMany (const thrust::host_vector< T > &h_keys) |
| Inserts keys from a Thrust host vector without outputting results. | |
| void | containsMany (const thrust::host_vector< T > &h_keys, thrust::host_vector< bool > &h_output) |
| Checks for existence of keys in a Thrust host vector. | |
| void | containsMany (const thrust::host_vector< T > &h_keys, thrust::host_vector< uint8_t > &h_output) |
| Checks for existence of keys in a Thrust host vector (uint8_t output). | |
| size_t | deleteMany (const thrust::host_vector< T > &h_keys, thrust::host_vector< bool > &h_output) |
| Deletes keys in a Thrust host vector. | |
| size_t | deleteMany (const thrust::host_vector< T > &h_keys, thrust::host_vector< uint8_t > &h_output) |
| Deletes keys in a Thrust host vector (uint8_t output). | |
| size_t | deleteMany (const thrust::host_vector< T > &h_keys) |
| Deletes keys in a Thrust host vector without outputting results. | |
Static Public Attributes | |
| static constexpr float | defaultMemoryFactor = 0.8f |
| Default fraction of free GPU memory to use for buffers (after filter allocation) | |
A multi-GPU implementation of the Cuckoo Filter.
This class partitions keys across multiple GPUs using the gossip library for efficient multi-GPU communication. It handles data distribution using gossip's multisplit and all-to-all primitives, and aggregates results.
Definition at line 37 of file CuckooFilterMultiGPU.cuh.
| using cuckoogpu::FilterMultiGPU< Config >::T = typename Config::KeyType |
Definition at line 39 of file CuckooFilterMultiGPU.cuh.
|
inline |
Constructs a new FilterMultiGPU with default transfer plan.
Initializes gossip context, multisplit, all-to-all primitives, and Filter instances on each available GPU.
| numGPUs | Number of GPUs to use. |
| capacity | Total capacity of the distributed filter. |
| memFactor | Fraction of free GPU memory to use for buffers. |
Definition at line 324 of file CuckooFilterMultiGPU.cuh.
|
inline |
Constructs a new FilterMultiGPU with custom transfer plan.
Initializes gossip context, multisplit, all-to-all primitives with provided transfer plan loaded from file, and Filter instances on each available GPU.
| numGPUs | Number of GPUs to use. |
| capacity | Total capacity of the distributed filter. |
| transferPlanPath | Path to gossip transfer plan file for optimized topology-aware transfers. |
| memFactor | Fraction of free GPU memory to use for buffers. |
Definition at line 366 of file CuckooFilterMultiGPU.cuh.
|
inline |
Destroys the FilterMultiGPU.
Cleans up filter instances and pre-allocated buffers.
Definition at line 424 of file CuckooFilterMultiGPU.cuh.
|
delete |
|
inline |
Clears all filters on all GPUs.
Definition at line 577 of file CuckooFilterMultiGPU.cuh.
|
inline |
Checks for the presence of multiple keys in the filter.
| h_keys | Pointer to host memory containing keys to check. |
| n | Number of keys to check. |
| h_output | Pointer to host memory to store results (true if present, false otherwise). |
Definition at line 477 of file CuckooFilterMultiGPU.cuh.
|
inline |
Checks for existence of keys in a Thrust host vector.
| h_keys | Vector of keys to check. |
| h_output | Vector to store results (bool). Resized if necessary. |
Definition at line 646 of file CuckooFilterMultiGPU.cuh.
|
inline |
Checks for existence of keys in a Thrust host vector (uint8_t output).
| h_keys | Vector of keys to check. |
| h_output | Vector to store results (uint8_t). Resized if necessary. |
Definition at line 661 of file CuckooFilterMultiGPU.cuh.
|
inline |
Deletes multiple keys from the filter.
| h_keys | Pointer to host memory containing keys to delete. |
| n | Number of keys to delete. |
| h_output | Optional pointer to host memory to store results (true if found and deleted). |
Definition at line 497 of file CuckooFilterMultiGPU.cuh.
|
inline |
Deletes keys in a Thrust host vector without outputting results.
| h_keys | Vector of keys to delete. |
Definition at line 706 of file CuckooFilterMultiGPU.cuh.
|
inline |
Deletes keys in a Thrust host vector.
| h_keys | Vector of keys to delete. |
| h_output | Vector to store results (bool). Resized if necessary. |
Definition at line 676 of file CuckooFilterMultiGPU.cuh.
|
inline |
Deletes keys in a Thrust host vector (uint8_t output).
| h_keys | Vector of keys to delete. |
| h_output | Vector to store results (uint8_t). Resized if necessary. |
Definition at line 692 of file CuckooFilterMultiGPU.cuh.
|
inline |
Inserts a batch of keys into the distributed filter.
Uses gossip primitives for efficient multi-GPU data distribution.
| h_keys | Pointer to host memory containing keys to insert. |
| n | Number of keys to insert. |
| h_output | Optional pointer to host memory to store results (true if successfully inserted). |
Definition at line 445 of file CuckooFilterMultiGPU.cuh.
|
inline |
Inserts keys from a Thrust host vector without outputting results.
| h_keys | Vector of keys to insert. |
Definition at line 637 of file CuckooFilterMultiGPU.cuh.
|
inline |
Inserts keys from a Thrust host vector.
| h_keys | Vector of keys to insert. |
| h_output | Vector to store results (bool). Resized if necessary. |
Definition at line 607 of file CuckooFilterMultiGPU.cuh.
|
inline |
Inserts keys from a Thrust host vector (uint8_t output).
| h_keys | Vector of keys to insert. |
| h_output | Vector to store results (uint8_t). Resized if necessary. |
Definition at line 623 of file CuckooFilterMultiGPU.cuh.
|
inline |
Calculates the global load factor.
Definition at line 527 of file CuckooFilterMultiGPU.cuh.
|
delete |
|
inline |
Executes a function in parallel across all GPUs.
Spawns a thread for each GPU to run the provided function.
| Func | Type of the function to execute. |
| func | The function to execute, taking the GPU index as an argument. |
Definition at line 540 of file CuckooFilterMultiGPU.cuh.
|
inline |
Definition at line 593 of file CuckooFilterMultiGPU.cuh.
|
inline |
Synchronizes all GPU streams used by this filter.
Definition at line 557 of file CuckooFilterMultiGPU.cuh.
|
inline |
Returns the total capacity of the distributed filter.
Definition at line 585 of file CuckooFilterMultiGPU.cuh.
|
inline |
Returns the total number of occupied slots across all GPUs.
Definition at line 565 of file CuckooFilterMultiGPU.cuh.
|
staticconstexpr |
Default fraction of free GPU memory to use for buffers (after filter allocation)
Definition at line 57 of file CuckooFilterMultiGPU.cuh.