MCPcopy Create free account
hub / github.com/apache/arrow-rs / resize_for_bits

Function resize_for_bits

arrow-data/src/transform/utils.rs:24–29  ·  view source on GitHub ↗
(buffer: &mut MutableBuffer, len: usize)

Source from the content-addressed store, hash-verified

22/// extends the `buffer` to be able to hold `len` bits, setting all bits of the new size to zero.
23#[inline]
24pub(super) fn resize_for_bits(buffer: &mut MutableBuffer, len: usize) {
25 let needed_bytes = bit_util::ceil(len, 8);
26 if buffer.len() < needed_bytes {
27 buffer.resize(needed_bytes, 0);
28 }
29}
30
31pub(super) fn extend_offsets<T: ArrowNativeType + Integer + CheckedAdd>(
32 buffer: &mut MutableBuffer,

Callers 3

build_extend_null_bitsFunction · 0.85
build_extendFunction · 0.85
extend_nullsFunction · 0.85

Calls 3

ceilFunction · 0.50
lenMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected