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

Function make_header

nodedb-codec/src/vector_quant/layout.rs:353–363  ·  view source on GitHub ↗
(mode: QuantMode, dim: u16, bitmask: u64)

Source from the content-addressed store, hash-verified

351 use super::*;
352
353 fn make_header(mode: QuantMode, dim: u16, bitmask: u64) -> QuantHeader {
354 QuantHeader {
355 quant_mode: mode as u16,
356 dim,
357 global_scale: 1.5,
358 residual_norm: 0.25,
359 dot_quantized: 2.5,
360 outlier_bitmask: bitmask,
361 reserved: [0xAB; 8],
362 }
363 }
364
365 #[test]
366 fn header_is_32_bytes() {

Callers 7

no_outliers_roundtripFunction · 0.70
one_outlier_roundtripFunction · 0.70
eight_outliers_roundtripFunction · 0.70
outlier_ordering_popcntFunction · 0.70

Calls

no outgoing calls

Tested by 7

no_outliers_roundtripFunction · 0.56
one_outlier_roundtripFunction · 0.56
eight_outliers_roundtripFunction · 0.56
outlier_ordering_popcntFunction · 0.56