tiny.simd.combineShiftRightBytes
Defined in block.
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
| Definitions | 1 |
|---|---|
| Public names | 2 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |