MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / count_ones

Method count_ones

nodedb/src/engine/timeseries/bitmap_index.rs:86–88  ·  view source on GitHub ↗

Count of set bits.

(&self)

Source from the content-addressed store, hash-verified

84
85 /// Count of set bits.
86 pub fn count_ones(&self) -> usize {
87 self.bits.iter().map(|w| w.count_ones() as usize).sum()
88 }
89
90 /// Iterate over set bit positions.
91 pub fn iter_ones(&self) -> impl Iterator<Item = u32> + '_ {

Callers 13

scalarFunction · 0.80
avx512Function · 0.80
avx2Function · 0.80
neonFunction · 0.80
newMethod · 0.80
outlier_countMethod · 0.80
outlier_atMethod · 0.80
header_field_roundtripFunction · 0.80
hamming_distanceFunction · 0.80
hamming_distance_fastFunction · 0.80
fast_hammingFunction · 0.80
popcountFunction · 0.80

Calls 2

sumMethod · 0.80
iterMethod · 0.45

Tested by 1

header_field_roundtripFunction · 0.64