Skip to documentation
SLOP

tiny.simd.multiRotateRight

Reference tiny.simd multiRotateRight

Defined in rotate.

Called byCallstest sourcelib.simd.src.rotatetest: Highway multi rotate composes b...private sourcelib.simd.src.testverifyWideRotateOracleprivate sourcelib.simd.src.rotatevalidaterotatemultiRotateRight
Static calls · unresolved targets: 1 · external targets: 1.

Source

Source: lib/simd/src/rotate.zig:50

zig
pub fn multiRotateRight(    comptime D: type,    value: D.Vector,    indices: D.repartition(u8).Vector,) D.Vector {    validate(D);    if (@bitSizeOf(D.Lane) != 64) @compileError("multiRotateRight requires 64-bit lanes");    const bits: @Vector(D.lane_count, u64) = @bitCast(value);    const index_lanes: [D.lane_count * 8]u8 = indices;    var result: @Vector(D.lane_count, u64) = @splat(0);    inline for (0..D.lane_count) |lane_index| {        var lane: u64 = 0;        inline for (0..8) |byte_index| {            const amount = index_lanes[lane_index * 8 + byte_index] & 63;            const byte: u8 = @truncate(std.math.rotr(u64, bits[lane_index], amount));            const destination = if (builtin.cpu.arch.endian() == .little)                byte_index            else                byte_index ^ 7;            lane |= @as(u64, byte) << @intCast(destination * 8);        }        result[lane_index] = lane;    }    return @bitCast(result);}

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

zig
pub const multiRotateRight = rotate.multiRotateRight;

Audit

Definitions1
Public names2
Members0
Version26.7.0
Revisiondaab053ee433