Skip to documentation
SLOP

tiny.simd.expand

Reference tiny.simd expand

Defined in compact.

Called byCallsNo direct callstest sourcelib.simd.src.compacttest: Highway expand scatters consecu...private sourcelib.simd.src.compactverifyLaneTypecompactexpand
Static calls · unresolved targets: 0 · external targets: 0.

Source

Source: lib/simd/src/compact.zig:81

zig
pub fn expand(comptime D: type, value: D.Vector, mask: D.Mask) D.Vector {    const lanes: [D.lane_count]D.Lane = @bitCast(value);    var result: [D.lane_count]D.Lane = @splat(0);    var position: usize = 0;    inline for (0..D.lane_count) |index| {        if (mask[index]) {            result[index] = lanes[position];            position += 1;        }    }    return @bitCast(result);}

Source: lib/simd/src/root.zig:909

zig
pub const expand = compact.expand;

Audit

Definitions1
Public names2
Members0
Version26.7.0
Revisiondaab053ee433