tiny.simd.roundingShr
Defined in shift.
Source
Source: lib/simd/src/shift.zig:73
zig
pub fn roundingShr(comptime D: type, value: D.Vector, amounts: D.Vector) D.Vector { validate(D); const U = UnsignedVector(D); const raw: U = @bitCast(amounts); const zero: U = @splat(0); const one: U = @splat(1); const scaled_amounts: U = @select(UnsignedLane(D), raw == zero, zero, raw -% one); const scaled = shr(D, value, @bitCast(scaled_amounts)); const other = @select(D.Lane, raw == zero, scaled, @as(D.Vector, @splat(0))); return averageRound(D, scaled, other);}Source: lib/simd/src/root.zig:745
zig
pub const roundingShr = shift.roundingShr;Audit
| Definitions | 1 |
|---|---|
| Public names | 2 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |