#![cfg(feature = "gemmology")]
use fxtranslate::gemm::PreparedB;
#[test]
fn read_row_roundtrips_every_row() {
for (n, k) in [(37usize, 64usize), (32000usize, 512usize)] {
let raw: Vec<i8> = (0..n * k)
.map(|i| ((i.wrapping_mul(2_654_435_761) >> 5) & 0xff) as i8)
.collect();
let Some(pb) = PreparedB::new(&raw, n, k) else {
return;
};
let mut row = vec![0i8; k];
for id in 0..n {
pb.read_row(id, &mut row);
assert_eq!(
&row[..],
&raw[id * k..(id + 1) * k],
"row {id} of {n}x{k} must read back bit-identical"
);
}
}
}