Skip to documentation
SLOP

tiny.simd.sumsOfAdjQuadAbsDiff

Reference tiny.simd sumsOfAdjQuadAbsDiff

Defined in reduce.

Called byCallstest sourcelib.simd.src.reducetest: Highway absolute-difference red...private sourcelib.simd.src.reduceabsoluteDifferenceprivate sourcelib.simd.src.reducerequireByteLaneprivate sourcelib.simd.src.reducewideLanereducesumsOfAdjQuadAbsDiff
Static calls · unresolved targets: 1 · external targets: 0.

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

Definitions1
Public names2
Members0
Version26.7.0
Revisiondaab053ee433