cvt¶
Converts elements of a vector register to another datatype with numerical casting. A floating-point element converted to an integer is truncated toward zero, as a C cast: 2.7 gives 2 (cvtround, cvtroundeven, cvtfloor and cvtceil round instead). An integer without an exact floating-point representation is rounded to the nearest one. The conversion to an integer of a NaN, or of a value out of the range of the destination, gives a result that depends on the target.
Mathematical semantics: \(\text{res}_i = (T_{\text{dst}}) vd0_i\)
Prototypes¶
// LMUL = 1 (also without the _m1 suffix)
vd_float64_m1_t mipp_cvt_float64_float64_m1(const vd_float64_m1_t vd0);
vd_float32_m1_t mipp_cvt_float32_float32_m1(const vd_float32_m1_t vd0);
vd_int64_m1_t mipp_cvt_int64_int64_m1(const vd_int64_m1_t vd0);
vd_int32_m1_t mipp_cvt_int32_int32_m1(const vd_int32_m1_t vd0);
vd_uint64_m1_t mipp_cvt_uint64_uint64_m1(const vd_uint64_m1_t vd0);
vd_uint32_m1_t mipp_cvt_uint32_uint32_m1(const vd_uint32_m1_t vd0);
vd_int16_m1_t mipp_cvt_int16_int16_m1(const vd_int16_m1_t vd0);
vd_int8_m1_t mipp_cvt_int8_int8_m1(const vd_int8_m1_t vd0);
vd_uint16_m1_t mipp_cvt_uint16_uint16_m1(const vd_uint16_m1_t vd0);
vd_uint8_m1_t mipp_cvt_uint8_uint8_m1(const vd_uint8_m1_t vd0);
vd_int64_m1_t mipp_cvt_float64_int64_m1(const vd_float64_m1_t vd0);
vd_int32_m1_t mipp_cvt_float32_int32_m1(const vd_float32_m1_t vd0);
vd_uint64_m1_t mipp_cvt_float64_uint64_m1(const vd_float64_m1_t vd0);
vd_uint32_m1_t mipp_cvt_float32_uint32_m1(const vd_float32_m1_t vd0);
vd_float64_m1_t mipp_cvt_int64_float64_m1(const vd_int64_m1_t vd0);
vd_float32_m1_t mipp_cvt_int32_float32_m1(const vd_int32_m1_t vd0);
vd_uint64_m1_t mipp_cvt_int64_uint64_m1(const vd_int64_m1_t vd0);
vd_uint32_m1_t mipp_cvt_int32_uint32_m1(const vd_int32_m1_t vd0);
vd_uint16_m1_t mipp_cvt_int16_uint16_m1(const vd_int16_m1_t vd0);
vd_uint8_m1_t mipp_cvt_int8_uint8_m1(const vd_int8_m1_t vd0);
vd_float64_m1_t mipp_cvt_uint64_float64_m1(const vd_uint64_m1_t vd0);
vd_float32_m1_t mipp_cvt_uint32_float32_m1(const vd_uint32_m1_t vd0);
vd_int64_m1_t mipp_cvt_uint64_int64_m1(const vd_uint64_m1_t vd0);
vd_int32_m1_t mipp_cvt_uint32_int32_m1(const vd_uint32_m1_t vd0);
vd_int16_m1_t mipp_cvt_uint16_int16_m1(const vd_uint16_m1_t vd0);
vd_int8_m1_t mipp_cvt_uint8_int8_m1(const vd_uint8_m1_t vd0);
// LMUL = 2
vd_float64_m2_t mipp_cvt_float64_float64_m2(const vd_float64_m2_t vd0);
vd_float32_m2_t mipp_cvt_float32_float32_m2(const vd_float32_m2_t vd0);
vd_int64_m2_t mipp_cvt_int64_int64_m2(const vd_int64_m2_t vd0);
vd_int32_m2_t mipp_cvt_int32_int32_m2(const vd_int32_m2_t vd0);
vd_uint64_m2_t mipp_cvt_uint64_uint64_m2(const vd_uint64_m2_t vd0);
vd_uint32_m2_t mipp_cvt_uint32_uint32_m2(const vd_uint32_m2_t vd0);
vd_int16_m2_t mipp_cvt_int16_int16_m2(const vd_int16_m2_t vd0);
vd_int8_m2_t mipp_cvt_int8_int8_m2(const vd_int8_m2_t vd0);
vd_uint16_m2_t mipp_cvt_uint16_uint16_m2(const vd_uint16_m2_t vd0);
vd_uint8_m2_t mipp_cvt_uint8_uint8_m2(const vd_uint8_m2_t vd0);
vd_int64_m2_t mipp_cvt_float64_int64_m2(const vd_float64_m2_t vd0);
vd_int32_m2_t mipp_cvt_float32_int32_m2(const vd_float32_m2_t vd0);
vd_uint64_m2_t mipp_cvt_float64_uint64_m2(const vd_float64_m2_t vd0);
vd_uint32_m2_t mipp_cvt_float32_uint32_m2(const vd_float32_m2_t vd0);
vd_float64_m2_t mipp_cvt_int64_float64_m2(const vd_int64_m2_t vd0);
vd_float32_m2_t mipp_cvt_int32_float32_m2(const vd_int32_m2_t vd0);
vd_uint64_m2_t mipp_cvt_int64_uint64_m2(const vd_int64_m2_t vd0);
vd_uint32_m2_t mipp_cvt_int32_uint32_m2(const vd_int32_m2_t vd0);
vd_uint16_m2_t mipp_cvt_int16_uint16_m2(const vd_int16_m2_t vd0);
vd_uint8_m2_t mipp_cvt_int8_uint8_m2(const vd_int8_m2_t vd0);
vd_float64_m2_t mipp_cvt_uint64_float64_m2(const vd_uint64_m2_t vd0);
vd_float32_m2_t mipp_cvt_uint32_float32_m2(const vd_uint32_m2_t vd0);
vd_int64_m2_t mipp_cvt_uint64_int64_m2(const vd_uint64_m2_t vd0);
vd_int32_m2_t mipp_cvt_uint32_int32_m2(const vd_uint32_m2_t vd0);
vd_int16_m2_t mipp_cvt_uint16_int16_m2(const vd_uint16_m2_t vd0);
vd_int8_m2_t mipp_cvt_uint8_int8_m2(const vd_uint8_m2_t vd0);
// LMUL = 4
vd_float64_m4_t mipp_cvt_float64_float64_m4(const vd_float64_m4_t vd0);
vd_float32_m4_t mipp_cvt_float32_float32_m4(const vd_float32_m4_t vd0);
vd_int64_m4_t mipp_cvt_int64_int64_m4(const vd_int64_m4_t vd0);
vd_int32_m4_t mipp_cvt_int32_int32_m4(const vd_int32_m4_t vd0);
vd_uint64_m4_t mipp_cvt_uint64_uint64_m4(const vd_uint64_m4_t vd0);
vd_uint32_m4_t mipp_cvt_uint32_uint32_m4(const vd_uint32_m4_t vd0);
vd_int16_m4_t mipp_cvt_int16_int16_m4(const vd_int16_m4_t vd0);
vd_int8_m4_t mipp_cvt_int8_int8_m4(const vd_int8_m4_t vd0);
vd_uint16_m4_t mipp_cvt_uint16_uint16_m4(const vd_uint16_m4_t vd0);
vd_uint8_m4_t mipp_cvt_uint8_uint8_m4(const vd_uint8_m4_t vd0);
vd_int64_m4_t mipp_cvt_float64_int64_m4(const vd_float64_m4_t vd0);
vd_int32_m4_t mipp_cvt_float32_int32_m4(const vd_float32_m4_t vd0);
vd_uint64_m4_t mipp_cvt_float64_uint64_m4(const vd_float64_m4_t vd0);
vd_uint32_m4_t mipp_cvt_float32_uint32_m4(const vd_float32_m4_t vd0);
vd_float64_m4_t mipp_cvt_int64_float64_m4(const vd_int64_m4_t vd0);
vd_float32_m4_t mipp_cvt_int32_float32_m4(const vd_int32_m4_t vd0);
vd_uint64_m4_t mipp_cvt_int64_uint64_m4(const vd_int64_m4_t vd0);
vd_uint32_m4_t mipp_cvt_int32_uint32_m4(const vd_int32_m4_t vd0);
vd_uint16_m4_t mipp_cvt_int16_uint16_m4(const vd_int16_m4_t vd0);
vd_uint8_m4_t mipp_cvt_int8_uint8_m4(const vd_int8_m4_t vd0);
vd_float64_m4_t mipp_cvt_uint64_float64_m4(const vd_uint64_m4_t vd0);
vd_float32_m4_t mipp_cvt_uint32_float32_m4(const vd_uint32_m4_t vd0);
vd_int64_m4_t mipp_cvt_uint64_int64_m4(const vd_uint64_m4_t vd0);
vd_int32_m4_t mipp_cvt_uint32_int32_m4(const vd_uint32_m4_t vd0);
vd_int16_m4_t mipp_cvt_uint16_int16_m4(const vd_uint16_m4_t vd0);
vd_int8_m4_t mipp_cvt_uint8_int8_m4(const vd_uint8_m4_t vd0);
// LMUL = 8
vd_float64_m8_t mipp_cvt_float64_float64_m8(const vd_float64_m8_t vd0);
vd_float32_m8_t mipp_cvt_float32_float32_m8(const vd_float32_m8_t vd0);
vd_int64_m8_t mipp_cvt_int64_int64_m8(const vd_int64_m8_t vd0);
vd_int32_m8_t mipp_cvt_int32_int32_m8(const vd_int32_m8_t vd0);
vd_uint64_m8_t mipp_cvt_uint64_uint64_m8(const vd_uint64_m8_t vd0);
vd_uint32_m8_t mipp_cvt_uint32_uint32_m8(const vd_uint32_m8_t vd0);
vd_int16_m8_t mipp_cvt_int16_int16_m8(const vd_int16_m8_t vd0);
vd_int8_m8_t mipp_cvt_int8_int8_m8(const vd_int8_m8_t vd0);
vd_uint16_m8_t mipp_cvt_uint16_uint16_m8(const vd_uint16_m8_t vd0);
vd_uint8_m8_t mipp_cvt_uint8_uint8_m8(const vd_uint8_m8_t vd0);
vd_int64_m8_t mipp_cvt_float64_int64_m8(const vd_float64_m8_t vd0);
vd_int32_m8_t mipp_cvt_float32_int32_m8(const vd_float32_m8_t vd0);
vd_uint64_m8_t mipp_cvt_float64_uint64_m8(const vd_float64_m8_t vd0);
vd_uint32_m8_t mipp_cvt_float32_uint32_m8(const vd_float32_m8_t vd0);
vd_float64_m8_t mipp_cvt_int64_float64_m8(const vd_int64_m8_t vd0);
vd_float32_m8_t mipp_cvt_int32_float32_m8(const vd_int32_m8_t vd0);
vd_uint64_m8_t mipp_cvt_int64_uint64_m8(const vd_int64_m8_t vd0);
vd_uint32_m8_t mipp_cvt_int32_uint32_m8(const vd_int32_m8_t vd0);
vd_uint16_m8_t mipp_cvt_int16_uint16_m8(const vd_int16_m8_t vd0);
vd_uint8_m8_t mipp_cvt_int8_uint8_m8(const vd_int8_m8_t vd0);
vd_float64_m8_t mipp_cvt_uint64_float64_m8(const vd_uint64_m8_t vd0);
vd_float32_m8_t mipp_cvt_uint32_float32_m8(const vd_uint32_m8_t vd0);
vd_int64_m8_t mipp_cvt_uint64_int64_m8(const vd_uint64_m8_t vd0);
vd_int32_m8_t mipp_cvt_uint32_int32_m8(const vd_uint32_m8_t vd0);
vd_int16_m8_t mipp_cvt_uint16_int16_m8(const vd_uint16_m8_t vd0);
vd_int8_m8_t mipp_cvt_uint8_int8_m8(const vd_uint8_m8_t vd0);
// d2 (half-vector)
vd_float64_d2_t mipp_cvt_float64_float64_d2(const vd_float64_d2_t vd0);
vd_float32_d2_t mipp_cvt_float32_float32_d2(const vd_float32_d2_t vd0);
vd_int64_d2_t mipp_cvt_int64_int64_d2(const vd_int64_d2_t vd0);
vd_int32_d2_t mipp_cvt_int32_int32_d2(const vd_int32_d2_t vd0);
vd_uint64_d2_t mipp_cvt_uint64_uint64_d2(const vd_uint64_d2_t vd0);
vd_uint32_d2_t mipp_cvt_uint32_uint32_d2(const vd_uint32_d2_t vd0);
vd_int16_d2_t mipp_cvt_int16_int16_d2(const vd_int16_d2_t vd0);
vd_int8_d2_t mipp_cvt_int8_int8_d2(const vd_int8_d2_t vd0);
vd_uint16_d2_t mipp_cvt_uint16_uint16_d2(const vd_uint16_d2_t vd0);
vd_uint8_d2_t mipp_cvt_uint8_uint8_d2(const vd_uint8_d2_t vd0);
vd_int64_d2_t mipp_cvt_float64_int64_d2(const vd_float64_d2_t vd0);
vd_int32_d2_t mipp_cvt_float32_int32_d2(const vd_float32_d2_t vd0);
vd_uint64_d2_t mipp_cvt_float64_uint64_d2(const vd_float64_d2_t vd0);
vd_uint32_d2_t mipp_cvt_float32_uint32_d2(const vd_float32_d2_t vd0);
vd_float64_d2_t mipp_cvt_int64_float64_d2(const vd_int64_d2_t vd0);
vd_float32_d2_t mipp_cvt_int32_float32_d2(const vd_int32_d2_t vd0);
vd_uint64_d2_t mipp_cvt_int64_uint64_d2(const vd_int64_d2_t vd0);
vd_uint32_d2_t mipp_cvt_int32_uint32_d2(const vd_int32_d2_t vd0);
vd_uint16_d2_t mipp_cvt_int16_uint16_d2(const vd_int16_d2_t vd0);
vd_uint8_d2_t mipp_cvt_int8_uint8_d2(const vd_int8_d2_t vd0);
vd_float64_d2_t mipp_cvt_uint64_float64_d2(const vd_uint64_d2_t vd0);
vd_float32_d2_t mipp_cvt_uint32_float32_d2(const vd_uint32_d2_t vd0);
vd_int64_d2_t mipp_cvt_uint64_int64_d2(const vd_uint64_d2_t vd0);
vd_int32_d2_t mipp_cvt_uint32_int32_d2(const vd_uint32_d2_t vd0);
vd_int16_d2_t mipp_cvt_uint16_int16_d2(const vd_uint16_d2_t vd0);
vd_int8_d2_t mipp_cvt_uint8_int8_d2(const vd_uint8_d2_t vd0);
// LMUL = 1
vd<float64_t> cvt_float64(const vd<float64_t> vd0);
vd<float32_t> cvt_float32(const vd<float32_t> vd0);
vd<int64_t> cvt_int64(const vd<int64_t> vd0);
vd<int32_t> cvt_int32(const vd<int32_t> vd0);
vd<uint64_t> cvt_uint64(const vd<uint64_t> vd0);
vd<uint32_t> cvt_uint32(const vd<uint32_t> vd0);
vd<int16_t> cvt_int16(const vd<int16_t> vd0);
vd<int8_t> cvt_int8(const vd<int8_t> vd0);
vd<uint16_t> cvt_uint16(const vd<uint16_t> vd0);
vd<uint8_t> cvt_uint8(const vd<uint8_t> vd0);
vd<int64_t> cvt_int64(const vd<float64_t> vd0);
vd<int32_t> cvt_int32(const vd<float32_t> vd0);
vd<uint64_t> cvt_uint64(const vd<float64_t> vd0);
vd<uint32_t> cvt_uint32(const vd<float32_t> vd0);
vd<float64_t> cvt_float64(const vd<int64_t> vd0);
vd<float32_t> cvt_float32(const vd<int32_t> vd0);
vd<uint64_t> cvt_uint64(const vd<int64_t> vd0);
vd<uint32_t> cvt_uint32(const vd<int32_t> vd0);
vd<uint16_t> cvt_uint16(const vd<int16_t> vd0);
vd<uint8_t> cvt_uint8(const vd<int8_t> vd0);
vd<float64_t> cvt_float64(const vd<uint64_t> vd0);
vd<float32_t> cvt_float32(const vd<uint32_t> vd0);
vd<int64_t> cvt_int64(const vd<uint64_t> vd0);
vd<int32_t> cvt_int32(const vd<uint32_t> vd0);
vd<int16_t> cvt_int16(const vd<uint16_t> vd0);
vd<int8_t> cvt_int8(const vd<uint8_t> vd0);
// LMUL = 2
vd<float64_t, 2> cvt_float64(const vd<float64_t, 2> vd0);
vd<float32_t, 2> cvt_float32(const vd<float32_t, 2> vd0);
vd<int64_t, 2> cvt_int64(const vd<int64_t, 2> vd0);
vd<int32_t, 2> cvt_int32(const vd<int32_t, 2> vd0);
vd<uint64_t, 2> cvt_uint64(const vd<uint64_t, 2> vd0);
vd<uint32_t, 2> cvt_uint32(const vd<uint32_t, 2> vd0);
vd<int16_t, 2> cvt_int16(const vd<int16_t, 2> vd0);
vd<int8_t, 2> cvt_int8(const vd<int8_t, 2> vd0);
vd<uint16_t, 2> cvt_uint16(const vd<uint16_t, 2> vd0);
vd<uint8_t, 2> cvt_uint8(const vd<uint8_t, 2> vd0);
vd<int64_t, 2> cvt_int64(const vd<float64_t, 2> vd0);
vd<int32_t, 2> cvt_int32(const vd<float32_t, 2> vd0);
vd<uint64_t, 2> cvt_uint64(const vd<float64_t, 2> vd0);
vd<uint32_t, 2> cvt_uint32(const vd<float32_t, 2> vd0);
vd<float64_t, 2> cvt_float64(const vd<int64_t, 2> vd0);
vd<float32_t, 2> cvt_float32(const vd<int32_t, 2> vd0);
vd<uint64_t, 2> cvt_uint64(const vd<int64_t, 2> vd0);
vd<uint32_t, 2> cvt_uint32(const vd<int32_t, 2> vd0);
vd<uint16_t, 2> cvt_uint16(const vd<int16_t, 2> vd0);
vd<uint8_t, 2> cvt_uint8(const vd<int8_t, 2> vd0);
vd<float64_t, 2> cvt_float64(const vd<uint64_t, 2> vd0);
vd<float32_t, 2> cvt_float32(const vd<uint32_t, 2> vd0);
vd<int64_t, 2> cvt_int64(const vd<uint64_t, 2> vd0);
vd<int32_t, 2> cvt_int32(const vd<uint32_t, 2> vd0);
vd<int16_t, 2> cvt_int16(const vd<uint16_t, 2> vd0);
vd<int8_t, 2> cvt_int8(const vd<uint8_t, 2> vd0);
// LMUL = 4
vd<float64_t, 4> cvt_float64(const vd<float64_t, 4> vd0);
vd<float32_t, 4> cvt_float32(const vd<float32_t, 4> vd0);
vd<int64_t, 4> cvt_int64(const vd<int64_t, 4> vd0);
vd<int32_t, 4> cvt_int32(const vd<int32_t, 4> vd0);
vd<uint64_t, 4> cvt_uint64(const vd<uint64_t, 4> vd0);
vd<uint32_t, 4> cvt_uint32(const vd<uint32_t, 4> vd0);
vd<int16_t, 4> cvt_int16(const vd<int16_t, 4> vd0);
vd<int8_t, 4> cvt_int8(const vd<int8_t, 4> vd0);
vd<uint16_t, 4> cvt_uint16(const vd<uint16_t, 4> vd0);
vd<uint8_t, 4> cvt_uint8(const vd<uint8_t, 4> vd0);
vd<int64_t, 4> cvt_int64(const vd<float64_t, 4> vd0);
vd<int32_t, 4> cvt_int32(const vd<float32_t, 4> vd0);
vd<uint64_t, 4> cvt_uint64(const vd<float64_t, 4> vd0);
vd<uint32_t, 4> cvt_uint32(const vd<float32_t, 4> vd0);
vd<float64_t, 4> cvt_float64(const vd<int64_t, 4> vd0);
vd<float32_t, 4> cvt_float32(const vd<int32_t, 4> vd0);
vd<uint64_t, 4> cvt_uint64(const vd<int64_t, 4> vd0);
vd<uint32_t, 4> cvt_uint32(const vd<int32_t, 4> vd0);
vd<uint16_t, 4> cvt_uint16(const vd<int16_t, 4> vd0);
vd<uint8_t, 4> cvt_uint8(const vd<int8_t, 4> vd0);
vd<float64_t, 4> cvt_float64(const vd<uint64_t, 4> vd0);
vd<float32_t, 4> cvt_float32(const vd<uint32_t, 4> vd0);
vd<int64_t, 4> cvt_int64(const vd<uint64_t, 4> vd0);
vd<int32_t, 4> cvt_int32(const vd<uint32_t, 4> vd0);
vd<int16_t, 4> cvt_int16(const vd<uint16_t, 4> vd0);
vd<int8_t, 4> cvt_int8(const vd<uint8_t, 4> vd0);
// LMUL = 8
vd<float64_t, 8> cvt_float64(const vd<float64_t, 8> vd0);
vd<float32_t, 8> cvt_float32(const vd<float32_t, 8> vd0);
vd<int64_t, 8> cvt_int64(const vd<int64_t, 8> vd0);
vd<int32_t, 8> cvt_int32(const vd<int32_t, 8> vd0);
vd<uint64_t, 8> cvt_uint64(const vd<uint64_t, 8> vd0);
vd<uint32_t, 8> cvt_uint32(const vd<uint32_t, 8> vd0);
vd<int16_t, 8> cvt_int16(const vd<int16_t, 8> vd0);
vd<int8_t, 8> cvt_int8(const vd<int8_t, 8> vd0);
vd<uint16_t, 8> cvt_uint16(const vd<uint16_t, 8> vd0);
vd<uint8_t, 8> cvt_uint8(const vd<uint8_t, 8> vd0);
vd<int64_t, 8> cvt_int64(const vd<float64_t, 8> vd0);
vd<int32_t, 8> cvt_int32(const vd<float32_t, 8> vd0);
vd<uint64_t, 8> cvt_uint64(const vd<float64_t, 8> vd0);
vd<uint32_t, 8> cvt_uint32(const vd<float32_t, 8> vd0);
vd<float64_t, 8> cvt_float64(const vd<int64_t, 8> vd0);
vd<float32_t, 8> cvt_float32(const vd<int32_t, 8> vd0);
vd<uint64_t, 8> cvt_uint64(const vd<int64_t, 8> vd0);
vd<uint32_t, 8> cvt_uint32(const vd<int32_t, 8> vd0);
vd<uint16_t, 8> cvt_uint16(const vd<int16_t, 8> vd0);
vd<uint8_t, 8> cvt_uint8(const vd<int8_t, 8> vd0);
vd<float64_t, 8> cvt_float64(const vd<uint64_t, 8> vd0);
vd<float32_t, 8> cvt_float32(const vd<uint32_t, 8> vd0);
vd<int64_t, 8> cvt_int64(const vd<uint64_t, 8> vd0);
vd<int32_t, 8> cvt_int32(const vd<uint32_t, 8> vd0);
vd<int16_t, 8> cvt_int16(const vd<uint16_t, 8> vd0);
vd<int8_t, 8> cvt_int8(const vd<uint8_t, 8> vd0);
// d2 (half-vector)
vd<float64_t, -2> cvt_float64(const vd<float64_t, -2> vd0);
vd<float32_t, -2> cvt_float32(const vd<float32_t, -2> vd0);
vd<int64_t, -2> cvt_int64(const vd<int64_t, -2> vd0);
vd<int32_t, -2> cvt_int32(const vd<int32_t, -2> vd0);
vd<uint64_t, -2> cvt_uint64(const vd<uint64_t, -2> vd0);
vd<uint32_t, -2> cvt_uint32(const vd<uint32_t, -2> vd0);
vd<int16_t, -2> cvt_int16(const vd<int16_t, -2> vd0);
vd<int8_t, -2> cvt_int8(const vd<int8_t, -2> vd0);
vd<uint16_t, -2> cvt_uint16(const vd<uint16_t, -2> vd0);
vd<uint8_t, -2> cvt_uint8(const vd<uint8_t, -2> vd0);
vd<int64_t, -2> cvt_int64(const vd<float64_t, -2> vd0);
vd<int32_t, -2> cvt_int32(const vd<float32_t, -2> vd0);
vd<uint64_t, -2> cvt_uint64(const vd<float64_t, -2> vd0);
vd<uint32_t, -2> cvt_uint32(const vd<float32_t, -2> vd0);
vd<float64_t, -2> cvt_float64(const vd<int64_t, -2> vd0);
vd<float32_t, -2> cvt_float32(const vd<int32_t, -2> vd0);
vd<uint64_t, -2> cvt_uint64(const vd<int64_t, -2> vd0);
vd<uint32_t, -2> cvt_uint32(const vd<int32_t, -2> vd0);
vd<uint16_t, -2> cvt_uint16(const vd<int16_t, -2> vd0);
vd<uint8_t, -2> cvt_uint8(const vd<int8_t, -2> vd0);
vd<float64_t, -2> cvt_float64(const vd<uint64_t, -2> vd0);
vd<float32_t, -2> cvt_float32(const vd<uint32_t, -2> vd0);
vd<int64_t, -2> cvt_int64(const vd<uint64_t, -2> vd0);
vd<int32_t, -2> cvt_int32(const vd<uint32_t, -2> vd0);
vd<int16_t, -2> cvt_int16(const vd<uint16_t, -2> vd0);
vd<int8_t, -2> cvt_int8(const vd<uint8_t, -2> vd0);
// LMUL = 1
template <typename T_DST, typename T_SRC> Vd<T_DST> cvt(const Vd<T_SRC>& vd0);
// LMUL = 2
template <typename T_DST, typename T_SRC> Vd<T_DST, 2> cvt(const Vd<T_SRC, 2>& vd0);
// LMUL = 4
template <typename T_DST, typename T_SRC> Vd<T_DST, 4> cvt(const Vd<T_SRC, 4>& vd0);
// LMUL = 8
template <typename T_DST, typename T_SRC> Vd<T_DST, 8> cvt(const Vd<T_SRC, 8>& vd0);
// d2 (half-vector)
template <typename T_DST, typename T_SRC> Vd<T_DST, -2> cvt(const Vd<T_SRC, -2>& vd0);
Headers¶
// Option 1: Monolithic (entire library)
#include <mipp.h>
// Option 2: Category level
#include <mipp/c/cat/convert.h> // all variants & LMULs
#include <mipp/c/cat/u/convert.h> // 1D: 'u' variant only (*)
#include <mipp/c/cat/m2/convert.h> // 1D: LMUL=2 only (*)
#include <mipp/c/cat/u/m2/convert.h> // 2D: 'u' + LMUL=2 (*)
// Option 3: Function level (recommended for minimal dependencies)
#include <mipp/c/fun/cvt.h> // all variants & LMULs
#include <mipp/c/fun/u/cvt.h> // 1D: 'u' variant only (*)
#include <mipp/c/fun/m2/cvt.h> // 1D: LMUL=2 only (*)
#include <mipp/c/fun/u/m2/cvt.h> // 2D atomic: 'u' + LMUL=2 (fastest compilation) (*)
// (*) Fine-grained headers require MIPP generated with '--granularity fine'
// Option 1: Monolithic (entire library)
#include <mipp.hpp>
// Option 2: Category level
#include <mipp/cpp/cat/convert.hpp> // all variants & LMULs
#include <mipp/cpp/cat/u/convert.hpp> // 1D: 'u' variant only (*)
#include <mipp/cpp/cat/m2/convert.hpp> // 1D: LMUL=2 only (*)
#include <mipp/cpp/cat/u/m2/convert.hpp> // 2D: 'u' + LMUL=2 (*)
// Option 3: Function level (recommended for minimal dependencies)
#include <mipp/cpp/fun/cvt.hpp> // all variants & LMULs
#include <mipp/cpp/fun/u/cvt.hpp> // 1D: 'u' variant only (*)
#include <mipp/cpp/fun/m2/cvt.hpp> // 1D: LMUL=2 only (*)
#include <mipp/cpp/fun/u/m2/cvt.hpp> // 2D atomic: 'u' + LMUL=2 (fastest compilation) (*)
// (*) Fine-grained headers require MIPP generated with '--granularity fine'
// Option 1: Monolithic (entire library)
#include <mipp_obj.hpp>
// Option 2: Category level
#include <mipp/obj/cat/convert.hpp> // all variants & LMULs
#include <mipp/obj/cat/u/convert.hpp> // 1D: 'u' variant only (*)
#include <mipp/obj/cat/m2/convert.hpp> // 1D: LMUL=2 only (*)
#include <mipp/obj/cat/u/m2/convert.hpp> // 2D: 'u' + LMUL=2 (*)
// Option 3: Function level (recommended for minimal dependencies)
#include <mipp/obj/fun/cvt.hpp> // all variants & LMULs
#include <mipp/obj/fun/u/cvt.hpp> // 1D: 'u' variant only (*)
#include <mipp/obj/fun/m2/cvt.hpp> // 1D: LMUL=2 only (*)
#include <mipp/obj/fun/u/m2/cvt.hpp> // 2D atomic: 'u' + LMUL=2 (fastest compilation) (*)
// (*) Fine-grained headers require MIPP generated with '--granularity fine'
Supported Datatypes¶
float64→float64float32→float32int64→int64int32→int32uint64→uint64uint32→uint32int16→int16int8→int8uint16→uint16uint8→uint8float64→int64float32→int32float64→uint64float32→uint32int64→float64int32→float32int64→uint64int32→uint32int16→uint16int8→uint8uint64→float64uint32→float32uint64→int64uint32→int32uint16→int16uint8→int8
Architecture & Implementation Matrix¶
Legend: L0 Native Hardware • L1 Dedicated Emulation • L2 Generic Emulation • L3 Scalar Fallback • − N/A — Full details. When the level depends on a compiler flag, the best level is shown.
| Architecture | f64→f64 | f32→f32 | i64→i64 | i32→i32 | u64→u64 | u32→u32 | i16→i16 | i8→i8 | u16→u16 | u8→u8 | f64→i64 | f32→i32 | f64→u64 | f32→u32 | i64→f64 | i32→f32 | i64→u64 | i32→u32 | i16→u16 | i8→u8 | u64→f64 | u32→f32 | u64→i64 | u32→i32 | u16→i16 | u8→i8 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| SSE | L2 | L2 | L2 | L2 | L2 | L2 | L2 | L2 | L2 | L2 | L1 | L0 | L1 | L1 | L1 | L0 | L0 | L0 | L0 | L0 | L1 | L1 | L0 | L0 | L0 | L0 |
| AVX | L2 | L2 | L2 | L2 | L2 | L2 | L2 | L2 | L2 | L2 | L1 | L0 | L1 | L1 | L1 | L0 | L0 | L0 | L0 | L0 | L1 | L1 | L0 | L0 | L0 | L0 |
| AVX512 | L2 | L2 | L2 | L2 | L2 | L2 | L2 | L2 | L2 | L2 | L0 | L0 | L0 | L0 | L0 | L0 | L0 | L0 | L0 | L0 | L0 | L0 | L0 | L0 | L0 | L0 |
| NEON | L2 | L2 | L2 | L2 | L2 | L2 | L2 | L2 | L2 | L2 | L0 | L0 | L0 | L0 | L0 | L0 | L0 | L0 | L0 | L0 | L0 | L0 | L0 | L0 | L0 | L0 |
| RVV | L2 | L2 | L2 | L2 | L2 | L2 | L2 | L2 | L2 | L2 | L0 | L0 | L0 | L0 | L0 | L0 | L0 | L0 | L0 | L0 | L0 | L0 | L0 | L0 | L0 | L0 |
| SVE | L2 | L2 | L2 | L2 | L2 | L2 | L2 | L2 | L2 | L2 | L0 | L0 | L0 | L0 | L0 | L0 | L0 | L0 | L0 | L0 | L0 | L0 | L0 | L0 | L0 | L0 |
Reference Algorithm¶
The scalar reference of MIPP defines the expected result of the function, for each datatype and mask variant: the unit tests compare the SIMD implementations of every target with it.
Test & Verification Specifications¶
How the unit tests draw the inputs (random values) and compare each lane of the result with the scalar reference, as in the generated C API tests.
| Datatypes | Inputs | Comparison with the reference |
|---|---|---|
float64 → float64, float32 → float32 |
[-1, 1] | Exact |
int64 → any, int32 → any, uint64 → any, uint32 → any, int16 → any, int8 → any, uint16 → any, uint8 → any |
full range | Exact |
float64 → int64 |
[-9.223372036854775e+18, 9.223372036854775e+18] | Exact |
float32 → int32 |
[-2147483520, 2147483520] | Exact |
float64 → uint64 |
[0, 1.844674407370955e+19] | Exact |
float32 → uint32 |
[0, 4294967040] | Exact |
Special values
Every other iteration, the lanes of the inputs take these values (cycling, each further input one value later in the list), to cover the cases that random values never hit:
float32:0.5,0.75,1.5,2.999,-0.75,-0.25,7.5,1000000.5,16777215.0,2147483520.0float64:0.5,0.75,1.5,2.999,-0.75,-0.25,7.5,1000000000000000.5,4503599627370495.5,9.223372036854775e+18