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

Function initialize_u16_lookup_table

org/src/main.rs:16–22  ·  view source on GitHub ↗

Function to initialize the lookup table for u16 values

()

Source from the content-addressed store, hash-verified

14
15// Function to initialize the lookup table for u16 values
16pub fn initialize_u16_lookup_table() {
17 for i in 0..U16_TABLE_SIZE {
18 unsafe {
19 U16_LOOKUP_TABLE[i] = shift_and_accumulate_u16(i as u16);
20 }
21 }
22}
23
24// Helper function to compute shift_and_accumulate for u16 values
25fn shift_and_accumulate_u16(value: u16) -> u32 {

Callers 1

mainFunction · 0.85

Calls 1

shift_and_accumulate_u16Function · 0.70

Tested by

no test coverage detected