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

Function and_correctness

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

Source from the content-addressed store, hash-verified

237
238 #[test]
239 fn and_correctness() {
240 let o = ops();
241 let a: Vec<u64> = (0..100)
242 .map(|i| 0xFFFF_FFFF_0000_0000u64.wrapping_add(i))
243 .collect();
244 let b: Vec<u64> = (0..100)
245 .map(|i| 0x0000_FFFF_FFFF_0000u64.wrapping_add(i * 2))
246 .collect();
247 let mut out = vec![0u64; 100];
248 (o.and_slices)(&a, &b, &mut out);
249 for i in 0..100 {
250 assert_eq!(out[i], a[i] & b[i], "mismatch at {i}");
251 }
252 }
253
254 #[test]
255 fn or_correctness() {

Callers

nothing calls this directly

Calls 2

opsFunction · 0.85
collectMethod · 0.80

Tested by

no test coverage detected