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

Function packed_bits_len

nodedb-codec/src/vector_quant/layout.rs:115–119  ·  view source on GitHub ↗
(quant_mode: QuantMode, dim: u16)

Source from the content-addressed store, hash-verified

113
114#[inline]
115fn packed_bits_len(quant_mode: QuantMode, dim: u16) -> usize {
116 let bpw = quant_mode.bits_per_weight() as usize;
117 let total_bits = dim as usize * bpw;
118 total_bits.div_ceil(8)
119}
120
121#[inline]
122fn round_up_128(n: usize) -> usize {

Callers 1

target_sizeFunction · 0.85

Calls 1

bits_per_weightMethod · 0.80

Tested by

no test coverage detected