Skip to documentation
SLOP

tiny.simd.combineShiftRightBytes

Reference tiny.simd combineShiftRightBytes

Defined in block.

Called byCallsNo direct callsprivate sourcelib.simd.src.blockverifyBlockLaneTypeblockcombineShiftRightBytes
Static calls · unresolved targets: 0 · external targets: 0.

Source

Source: lib/simd/src/block.zig:56

zig
pub fn combineShiftRightBytes(    comptime D: type,    comptime amount: usize,    high: D.Vector,    low: D.Vector,) D.Vector {    const bytes_per_block = @min(D.byte_count, 16);    if (comptime amount >= bytes_per_block) @compileError("combined byte shift must remain inside a block");    const high_bytes: [D.byte_count]u8 = @bitCast(high);    const low_bytes: [D.byte_count]u8 = @bitCast(low);    var result: [D.byte_count]u8 = undefined;    inline for (0..D.byte_count) |index| {        const base = index / bytes_per_block * bytes_per_block;        const source = index % bytes_per_block + amount;        result[index] = if (source < bytes_per_block)            low_bytes[base + source]        else            high_bytes[base + source - bytes_per_block];    }    return @bitCast(result);}

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

zig
pub const combineShiftRightBytes = block.combineShiftRightBytes;

Audit

Definitions1
Public names2
Members0
Version26.7.0
Revisiondaab053ee433