null_mask#
2026-03-11
20 min read time
- pylibhipdf.null_mask.bitmask_allocation_size_bytes(size_type number_of_bits) size_t#
Computes the required bytes necessary to represent the specified number of bits with a 64B padding boundary.
For details, see
bitmask_allocation_size_bytes().Parameters#
- number_of_bitssize_type
The number of bits that need to be represented
Returns#
- size_t
The necessary number of bytes
- pylibhipdf.null_mask.bitmask_and(list columns, Stream stream=None) tuple#
Performs bitwise AND of the bitmasks of a list of columns.
For details, see
bitmask_and().Parameters#
- columnslist
The list of columns
- streamStream | None
CUDA stream on which to perform the operation.
Returns#
- tuple[DeviceBuffer, size_type]
A tuple of the resulting mask and count of unset bits
- pylibhipdf.null_mask.bitmask_or(list columns, Stream stream=None) tuple#
Performs bitwise OR of the bitmasks of a list of columns.
For details, see
bitmask_or().Parameters#
- columnslist
The list of columns
- streamStream | None
CUDA stream on which to perform the operation.
Returns#
- tuple[DeviceBuffer, size_type]
A tuple of the resulting mask and count of unset bits
- pylibhipdf.null_mask.copy_bitmask(Column col, Stream stream=None) DeviceBuffer#
Copies
col’s bitmask into aDeviceBuffer.For details, see
copy_bitmask().Parameters#
- colColumn
Column whose bitmask needs to be copied
- streamStream | None
CUDA stream on which to perform the operation.
Returns#
- rmm.DeviceBuffer
A
DeviceBuffercontainingcol’s bitmask, or an emptyDeviceBufferifcolis not nullable
- pylibhipdf.null_mask.create_null_mask(size_type size, mask_state state=mask_state.UNINITIALIZED, Stream stream=None) DeviceBuffer#
Creates a
DeviceBufferfor use as a null value indicator bitmask of aColumn.For details, see
create_null_mask().Parameters#
- sizesize_type
The number of elements to be represented by the mask
- statemask_state, optional
The desired state of the mask. Can be one of { MaskState.UNALLOCATED, MaskState.UNINITIALIZED, MaskState.ALL_VALID, MaskState.ALL_NULL } (default MaskState.UNINITIALIZED)
- streamStream | None
CUDA stream on which to perform the operation.
Returns#
- rmm.DeviceBuffer
A
DeviceBufferfor use as a null bitmask satisfying the desired size and state
- pylibhipdf.null_mask.null_count(gpumemoryview bitmask, size_type start, size_type stop, Stream stream=None) size_type#
Given a validity bitmask, counts the number of null elements.
For details, see
null_count().Parameters#
- bitmaskint
Integer pointer to the bitmask.
- startint
Index of the first bit to count (inclusive).
- stopint
Index of the last bit to count (exclusive).
- streamStream | None
CUDA stream on which to perform the operation.
Returns#
- int
The number of null elements in the specified range.