Functions | |
| constexpr CUDF_HOST_DEVICE size_type | cudf::word_index (size_type bit_index) |
| Returns the index of the word containing the specified bit. More... | |
| constexpr CUDF_HOST_DEVICE size_type | cudf::intra_word_index (size_type bit_index) |
| Returns the position within a word of the specified bit. More... | |
| CUDF_HOST_DEVICE void | cudf::set_bit_unsafe (bitmask_type *bitmask, size_type bit_index) |
Sets the specified bit to 1 More... | |
| CUDF_HOST_DEVICE void | cudf::clear_bit_unsafe (bitmask_type *bitmask, size_type bit_index) |
Sets the specified bit to 0 More... | |
| CUDF_HOST_DEVICE bool | cudf::bit_is_set (bitmask_type const *bitmask, size_type bit_index) |
Indicates whether the specified bit is set to 1 More... | |
| CUDF_HOST_DEVICE bool | cudf::bit_value_or (bitmask_type const *bitmask, size_type bit_index, bool default_value) |
| optional-like interface to check if a specified bit of a bitmask is set. More... | |
| constexpr CUDF_HOST_DEVICE bitmask_type | cudf::set_least_significant_bits (size_type n) |
Returns a bitmask word with the n least significant bits set. More... | |
| constexpr CUDF_HOST_DEVICE bitmask_type | cudf::set_most_significant_bits (size_type n) |
Returns a bitmask word with the n most significant bits set. More... | |
|
inline |
#include <cudf/utilities/bit.hpp>
Indicates whether the specified bit is set to 1
| bitmask | The bitmask containing the bit to test |
| bit_index | Index of the bit to test |
1 0
|
inline |
#include <cudf/utilities/bit.hpp>
optional-like interface to check if a specified bit of a bitmask is set.
| bitmask | The bitmask containing the bit to clear |
| bit_index | Index of the bit to test |
| default_value | Value to return if bitmask is nullptr |
1 0 default_value if bitmask is nullptr
|
inline |
#include <cudf/utilities/bit.hpp>
Sets the specified bit to 0
This function is not thread-safe, i.e., attempting to update bits within the same word concurrently from multiple threads results in undefined behavior.
| bitmask | The bitmask containing the bit to clear |
| bit_index | The index of the bit to clear |
|
inlineconstexpr |
#include <cudf/utilities/bit.hpp>
Returns the position within a word of the specified bit.
| bit_index | The index of the bit to query |
|
inline |
#include <cudf/utilities/bit.hpp>
Sets the specified bit to 1
This function is not thread-safe, i.e., attempting to update bits within the same word concurrently from multiple threads results in undefined behavior.
| bitmask | The bitmask containing the bit to set |
| bit_index | Index of the bit to set |
|
inlineconstexpr |
#include <cudf/utilities/bit.hpp>
Returns a bitmask word with the n least significant bits set.
Behavior is undefined if n < 0 or if n >= size_in_bits<bitmask_type>()
| n | The number of least significant bits to set |
n least significant bits set
|
inlineconstexpr |
#include <cudf/utilities/bit.hpp>
Returns a bitmask word with the n most significant bits set.
Behavior is undefined if n < 0 or if n >= size_in_bits<bitmask_type>()
| n | The number of most significant bits to set |
n most significant bits set
|
inlineconstexpr |
#include <cudf/utilities/bit.hpp>
Returns the index of the word containing the specified bit.
| bit_index | The index of the bit to query |