Skip to documentation
SLOP

tiny.simd.promoteTo

Reference tiny.simd promoteTo

Defined in convert.

Called byCallsconvertpromoteInRangeToprivate sourcelib.simd.src.convertpromoteSelectedtest sourcelib.simd.src.converttest: Highway conversion entry points...test sourcelib.simd.src.converttest: Highway float widening narrowin...test sourcelib.simd.src.converttest: Highway integer conversions wid...bfloatpromoteF32private sourcelib.simd.src.convertnumericCastprivate sourcelib.simd.src.convertsourceLaneprivate sourcelib.simd.src.convertvalidateLaneCountconvertpromoteTo
Static calls · unresolved targets: 0 · external targets: 0.

Source

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

zig
pub fn promoteTo(comptime D: type, value: anytype) D.Vector {    const V = @TypeOf(value);    const From = sourceLane(V);    validateLaneCount(D, V);    if (comptime D.Lane == f32 and From == u16) return bfloat.promoteF32(D, value);    if (@bitSizeOf(D.Lane) <= @bitSizeOf(From)) {        @compileError("promoteTo requires a wider destination lane");    }    if (@typeInfo(From) == .int and @typeInfo(D.Lane) == .int and        @typeInfo(From).int.signedness == .signed and        @typeInfo(D.Lane).int.signedness == .unsigned)    {        @compileError("promoteTo does not convert signed integers to unsigned integers");    }    return numericCast(D, value);}

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

zig
pub const promoteTo = convert.promoteTo;

Audit

Definitions1
Public names2
Members0
Version26.7.0
Revisiondaab053ee433