null_mask#

pylibcudf.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

pylibcudf.null_mask.bitmask_and(list columns) tuple#

Performs bitwise AND of the bitmasks of a list of columns.

For details, see bitmask_and().

Parameters:
columnslist

The list of columns

Returns:
tuple[DeviceBuffer, size_type]

A tuple of the resulting mask and count of unset bits

pylibcudf.null_mask.bitmask_or(list columns) tuple#

Performs bitwise OR of the bitmasks of a list of columns.

For details, see bitmask_or().

Parameters:
columnslist

The list of columns

Returns:
tuple[DeviceBuffer, size_type]

A tuple of the resulting mask and count of unset bits

pylibcudf.null_mask.copy_bitmask(Column col) rmm.DeviceBuffer#

Copies col’s bitmask into a DeviceBuffer.

For details, see copy_bitmask().

Parameters:
colColumn

Column whose bitmask needs to be copied

Returns:
rmm.DeviceBuffer

A DeviceBuffer containing col’s bitmask, or an empty DeviceBuffer if col is not nullable

pylibcudf.null_mask.create_null_mask(size_type size, mask_state state=mask_state.UNINITIALIZED) rmm.DeviceBuffer#

Creates a DeviceBuffer for use as a null value indicator bitmask of a Column.

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)

Returns:
rmm.DeviceBuffer

A DeviceBuffer for use as a null bitmask satisfying the desired size and state