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

Function shift_and_accumulate_u16

org/src/main.rs:25–32  ·  view source on GitHub ↗

Helper function to compute shift_and_accumulate for u16 values

(value: u16)

Source from the content-addressed store, hash-verified

23
24// Helper function to compute shift_and_accumulate for u16 values
25fn shift_and_accumulate_u16(value: u16) -> u32 {
26 let mut result: u32 = 0;
27 result += x_function(15 & (value as u32 >> 0));
28 result += x_function(15 & (value as u32 >> 4));
29 result += x_function(15 & (value as u32 >> 8));
30 result += x_function(15 & (value as u32 >> 12));
31 result
32}
33
34// x_function remains the same
35pub fn x_function(value: u32) -> u32 {

Callers 1

Calls 1

x_functionFunction · 0.70

Tested by

no test coverage detected