tiny.simd.sumsOfAdjQuadAbsDiff
Defined in reduce.
Source
Source: lib/simd/src/reduce.zig:138
zig
pub fn sumsOfAdjQuadAbsDiff( comptime D: type, comptime a_offset: usize, comptime b_offset: usize, a: D.Vector, b: D.Vector,) D.repartition(wideLane(D.Lane)).Vector { requireByteLane(D, "sumsOfAdjQuadAbsDiff"); if (a_offset > 1 or b_offset > 3) @compileError("quad offsets exceed a 128-bit block"); const W = wideLane(D.Lane); const R = D.repartition(W); var result: R.Vector = @splat(0); inline for (0..R.lane_count) |index| { const a_base = a_offset * 4 + (index / 8) * 16 + (index & 7); const b_base = b_offset * 4 + (index / 8) * 16; if (a_base + 3 < D.lane_count and b_base + 3 < D.lane_count) { var total: W = 0; inline for (0..4) |offset| { total += absoluteDifference(W, a[a_base + offset], b[b_base + offset]); } result[index] = total; } } return result;}Source: lib/simd/src/root.zig:925
zig
pub const sumsOfAdjQuadAbsDiff = reduce.sumsOfAdjQuadAbsDiff;Audit
| Definitions | 1 |
|---|---|
| Public names | 2 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |