MCPcopy Create free account
hub / github.com/cosdata/cosdata / shift_and_accumulate

Function shift_and_accumulate

org/src/main.rs:57–61  ·  view source on GitHub ↗
(value: u32)

Source from the content-addressed store, hash-verified

55}
56
57pub fn shift_and_accumulate(value: u32) -> u32 {
58 let high = (value >> 16) as u16;
59 let low = (value & 0xFFFF) as u16;
60 unsafe { U16_LOOKUP_TABLE[high as usize] + U16_LOOKUP_TABLE[low as usize] }
61}
62
63fn main() {
64 // Initialize the lookup table once

Callers 2

cosine_coalesceFunction · 0.85
cosine_similarity_newFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected