Expand description
§Utility Functions - SIMD Processing and Memory Management Utilities
Core utilities supporting SIMD kernel implementations with efficient memory handling, bitmask operations, and performance-critical helper functions.
Functions§
- bitmask_
to_ simd_ mask - Extracts a core::SIMD
Mask<M, N>for a batch of N lanes from a MinarrowBitmask. - confirm_
capacity - Validates that actual capacity matches expected capacity for kernel operations.
- confirm_
equal_ len - Validates that two lengths are equal for binary kernel operations.
- confirm_
mask_ capacity - Checks the mask capacity is large enough Used so we can avoid bounds checks in the hot loop
- estimate_
categorical_ cardinality - Estimate cardinality ratio on a sample from a CategoricalArray. Used to quickly figure out the optimal strategy when comparing StringArray and CategoricalArrays.
- estimate_
string_ cardinality - Estimate cardinality ratio on a sample from a StringArray. Used to quickly figure out the optimal strategy when comparing StringArray and CategoricalArrays.
- format_
finite - Strips ‘.0’ from concatenated decimal values so ‘Hello1.0’ becomes ‘Hello1’.
- has_
nulls - Determines whether nulls are present given an optional null count and mask reference. Avoids computing mask cardinality to preserve performance guarantees.
- is_
simd_ aligned - SIMD Alignment check. Returns true if the slice is properly 64-byte aligned for SIMD operations, false otherwise.
- merge_
bitmasks_ to_ new - Merge two optional Bitmasks into a new output mask, computing per-row AND. Returns None if both inputs are None (output is dense).
- simd_
mask - Creates a SIMD mask from a bitmask window for vectorised conditional operations.
- simd_
mask_ to_ bitmask - Converts a SIMD
Mask<M, N>to a MinarrowBitmaskfor the given logical length. Used at the end of a block operation within SIMD-accelerated kernel functions. - write_
global_ bitmask_ block - Bulk-ORs a local bitmask block (from a SIMD mask or similar) into the global Minarrow bitmask at the correct byte offset.
The block (
block_mask) is expected to contain at least ceil(n_lanes/8) bytes, with the bit-packed validity bits starting from position 0.