A type-erased wrapper around cuco's roaring bitmap supporting both 32-bit and 64-bit keys. More...
#include <roaring_bitmap.hpp>
Public Member Functions | |
| roaring_bitmap (roaring_bitmap_type type, cudf::host_span< cuda::std::byte const > serialized_bitmap_data) | |
| Constructs a roaring_bitmap from serialized bitmap data (payload) More... | |
| ~roaring_bitmap () | |
| Destructor for the roaring bitmap class. | |
| roaring_bitmap (roaring_bitmap &&other) noexcept | |
| Move constructor for the roaring bitmap class. More... | |
| roaring_bitmap & | operator= (roaring_bitmap &&other) noexcept |
| Move assignment operator for the roaring bitmap class. More... | |
| roaring_bitmap (roaring_bitmap const &)=delete | |
| roaring_bitmap & | operator= (roaring_bitmap const &)=delete |
| void | materialize (rmm::cuda_stream_view stream=cudf::get_default_stream()) const |
| Materialize the underlying cuco roaring bitmap. More... | |
| roaring_bitmap_type | type () const |
| Returns the roaring bitmap type. More... | |
| bool | empty () const |
| Checks whether the bitmap contains no keys. More... | |
| cuda::std::size_t | size () const |
| Returns the number of keys stored in the bitmap. More... | |
| cuda::std::size_t | size_bytes () const |
| Returns the size of the serialized bitmap storage in bytes. More... | |
| std::unique_ptr< cudf::column > | contains_async (cudf::column_view const &keys, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref()) const |
| Asynchronously queries the bitmap for membership of each key in the input column. More... | |
| void | contains_async (cudf::column_view const &keys, cudf::mutable_column_view const &output, rmm::cuda_stream_view stream) const |
| Asynchronously queries the bitmap for membership of each key in a column and stores the result in the output column. More... | |
A type-erased wrapper around cuco's roaring bitmap supporting both 32-bit and 64-bit keys.
This class holds a span of serialized roaring bitmap data (specified 32-bit or 64-bit) on the host and lazily materializes the corresponding underlying cuco roaring bitmap when materialize() is called or implicitly when contains_async() is first called.
Example usage (64-bit version):
Definition at line 53 of file roaring_bitmap.hpp.
|
explicit |
Constructs a roaring_bitmap from serialized bitmap data (payload)
The serialized bitmap data must remain valid until the underlying cuco roaring bitmap is materialized via materialize().
| type | The bitmap key type (BITS_32 or BITS_64) |
| serialized_bitmap_data | Host span of bytes containing a roaring bitmap serialized in portable format |
| std::invalid_argument | if the serialized bitmap data is empty |
|
noexcept |
Move constructor for the roaring bitmap class.
| other | Roaring bitmap to move from |
| void cudf::roaring_bitmap::contains_async | ( | cudf::column_view const & | keys, |
| cudf::mutable_column_view const & | output, | ||
| rmm::cuda_stream_view | stream | ||
| ) | const |
Asynchronously queries the bitmap for membership of each key in a column and stores the result in the output column.
The input column must have dtype UINT32 (for BITS_32) or UINT64 (for BITS_64). The output column must have BOOL8 dtype.
| keys | Key column to query |
| output | Output column to store the result |
| stream | CUDA stream used for device memory operations and kernel launches |
| std::invalid_argument | if the key or output column dtypes are invalid |
| std::unique_ptr<cudf::column> cudf::roaring_bitmap::contains_async | ( | cudf::column_view const & | keys, |
| rmm::cuda_stream_view | stream = cudf::get_default_stream(), |
||
| rmm::device_async_resource_ref | mr = cudf::get_current_device_resource_ref() |
||
| ) | const |
Asynchronously queries the bitmap for membership of each key in the input column.
The input column must have dtype UINT32 (for BITS_32) or UINT64 (for BITS_64).
| keys | Key column to query |
| stream | CUDA stream used for device memory operations and kernel launches |
| mr | Device memory resource for the output column allocation |
| std::invalid_argument | if the key column dtype is invalid |
| bool cudf::roaring_bitmap::empty | ( | ) | const |
Checks whether the bitmap contains no keys.
| void cudf::roaring_bitmap::materialize | ( | rmm::cuda_stream_view | stream = cudf::get_default_stream() | ) | const |
Materialize the underlying cuco roaring bitmap.
The serialized bitmap data span is cleared after this call.
| stream | CUDA stream used for device memory operations and kernel launches |
|
noexcept |
Move assignment operator for the roaring bitmap class.
| other | Roaring bitmap to move from |
| cuda::std::size_t cudf::roaring_bitmap::size | ( | ) | const |
Returns the number of keys stored in the bitmap.
| cuda::std::size_t cudf::roaring_bitmap::size_bytes | ( | ) | const |
Returns the size of the serialized bitmap storage in bytes.
| roaring_bitmap_type cudf::roaring_bitmap::type | ( | ) | const |
Returns the roaring bitmap type.