P2: decode mask-accumulator combine kernels from raw bytes — combine3(0x8d60)=sub, acc_add(0x5a20)=dst+=src, acc_fma(0x3c40)=dst+=a·b; implement + levelpath_check ALL OK

This commit is contained in:
2026-08-20 01:30:33 +03:00
parent d3db772121
commit 22e4599e0a
4 changed files with 57 additions and 2 deletions
+15
View File
@@ -48,6 +48,21 @@ int main() {
chk("band_lut_apply level_axis[512]", level_gain[1024], 0.5f, 1e-6);
}
// ---- combine kernels (0x8d60/0x5a20/0x3c40) ----
{
double out[4] = {0, 0, 0, 0};
double a[4] = {5, 2, -1, 8};
double b[4] = {3, 7, 4, 2};
combine_sub(out, a, b, 4);
chk("combine_sub[0] a-b", out[0], 2.0, 1e-12);
chk("combine_sub[2] a-b", out[2], -5.0, 1e-12);
acc_add(out, a, 4); // out = (a-b) + a
chk("acc_add[0]", out[0], 7.0, 1e-12); // (5-3)+5 = 7
acc_fma(out, b, a, 4); // out += b*a
// out[1] = (2-7)+2 = -3, then -3 + b[1]*a[1] = -3 + 7*2 = 11
chk("acc_fma[1]", out[1], 11.0, 1e-12);
}
std::printf(ok ? "ALL OK\n" : "FAILURES\n");
return ok ? 0 : 1;
}