Closed rvvstuding closed 11 months ago
f16
→i8
can be __riscv_vreinterpret_v_i16m1_i8m1(__riscv_vreinterpret_v_f16m1_i16m1(x))
.
f16
→f32
is a more unwieldy __riscv_vreinterpret_v_u32m1_f32m1(__riscv_vreinterpret_v_u16m1_u32m1(__riscv_vreinterpret_v_f16m1_u16m1(x)))
, but given that there's not much use for it, I think it's fine.
fwiw, here's some (auto-generated) code for all int/float LMUL=1 reinterprets:
Correct: the current API doesn't form the full Cartesian product of conversions, but there should be a path between any pair of types with same EMUL.
Hi everyone, As far as I know about reinterpret Intrinsics, they can reinterpret vector between different type under the same SEW/LMUL, or between different SEW under the same LMUL.
vfloat16m1_t
tovfloat32m1_t
vint8m1_t
tovuint16m1_t
, I can be achieved by using__riscv_vreinterpret_v_i16m1_u16m1(__riscv_vreinterpret_v_i8m1_i16m1(a))
. If this is right, How do I reinterpretvfloat16m1_t
tovint8m1_t
? Thanks!