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

Method count_set_bits_offset

arrow-buffer/src/buffer/immutable.rs:357–359  ·  view source on GitHub ↗

Returns the number of 1-bits in this buffer, starting from `offset` with `length` bits inspected. Note that both `offset` and `length` are measured in bits.

(&self, offset: usize, len: usize)

Source from the content-addressed store, hash-verified

355 /// Returns the number of 1-bits in this buffer, starting from `offset` with `length` bits
356 /// inspected. Note that both `offset` and `length` are measured in bits.
357 pub fn count_set_bits_offset(&self, offset: usize, len: usize) -> usize {
358 UnalignedBitChunk::new(self.as_slice(), offset, len).count_ones()
359 }
360
361 /// Returns `MutableBuffer` for mutating the buffer if this buffer is not shared.
362 /// Returns `Err` if this is shared or its allocation is from an external source or

Callers 3

count_set_bitsMethod · 0.80
filter_null_maskFunction · 0.80
count_nullsFunction · 0.80

Calls 2

count_onesMethod · 0.45
as_sliceMethod · 0.45

Tested by

no test coverage detected