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

Function precompute_lookup_table

org/src/main.rs:113–121  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

111}
112
113fn precompute_lookup_table() -> [[u8; 16]; 16] {
114 let mut table = [[0; 16]; 16];
115 for i in 0..16 {
116 for j in 0..16 {
117 table[i][j] = (i * j) as u8;
118 }
119 }
120 table
121}
122
123fn multiply_quantized_vectors(a: &[u8], b: &[u8], lookup_table: &[[u8; 16]; 16]) -> Vec<u8> {
124 let len = a.len().min(b.len());

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected