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

Function ternary_dot

nodedb-codec/src/vector_quant/ternary/simd.rs:126–129  ·  view source on GitHub ↗
(a_hot: &[u8], b_hot: &[u8], dim: usize)

Source from the content-addressed store, hash-verified

124/// Compute ternary dot product between two hot-packed byte slices.
125#[inline]
126pub fn ternary_dot(a_hot: &[u8], b_hot: &[u8], dim: usize) -> i32 {
127 let f = DOT_FN.get_or_init(resolve);
128 f(a_hot, b_hot, dim)
129}
130
131#[cfg(test)]
132mod tests {

Callers 3

simd_vs_scalar_agreementFunction · 0.85

Calls

no outgoing calls

Tested by 1

simd_vs_scalar_agreementFunction · 0.68