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

Function or_correctness

nodedb/src/engine/timeseries/bitmap_simd.rs:255–264  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

253
254 #[test]
255 fn or_correctness() {
256 let o = ops();
257 let a: Vec<u64> = (0..100).map(|i| i * 3).collect();
258 let b: Vec<u64> = (0..100).map(|i| i * 7).collect();
259 let mut out = vec![0u64; 100];
260 (o.or_slices)(&a, &b, &mut out);
261 for i in 0..100 {
262 assert_eq!(out[i], a[i] | b[i], "mismatch at {i}");
263 }
264 }
265
266 #[test]
267 fn small_input() {

Callers

nothing calls this directly

Calls 2

opsFunction · 0.85
collectMethod · 0.80

Tested by

no test coverage detected