Skip to documentation
SLOP

tiny.simd.demoteToNearestInt

Reference tiny.simd demoteToNearestInt

Defined in convert.

Called byCallstest sourcelib.simd.src.converttest: Highway conversion entry points...test sourcelib.simd.src.converttest: Highway float widening narrowin...private sourcelib.simd.src.convertroundEvenToIntprivate sourcelib.simd.src.convertsourceLaneprivate sourcelib.simd.src.convertvalidateLaneCountconvertdemoteToNearestInt
Static calls · unresolved targets: 0 · external targets: 0.

Source

Source: lib/simd/src/convert.zig:46

zig
pub fn demoteToNearestInt(comptime D: type, value: anytype) D.Vector {    const V = @TypeOf(value);    const From = sourceLane(V);    validateLaneCount(D, V);    if (@typeInfo(D.Lane) != .int or        @typeInfo(D.Lane).int.signedness != .signed or        @typeInfo(From) != .float or        @bitSizeOf(D.Lane) >= @bitSizeOf(From))    {        @compileError("demoteToNearestInt requires narrower signed integer destinations");    }    return roundEvenToInt(D, value);}

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

zig
pub const demoteToNearestInt = convert.demoteToNearestInt;

Audit

Definitions1
Public names2
Members0
Version26.7.0
Revisiondaab053ee433