You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vuint8m1_t__riscv_vreinterpret_u(vuint8m1_t v) { return v; }
vuint16m1_t__riscv_vreinterpret_u(vuint16m1_t) /* ... */
vuint32m1_t __riscv_vreinterpret_u(vuint32m1_t);
vuint64m1_t__riscv_vreinterpret_u(vuint64m1_t);
vuint8m1_t__riscv_vreinterpret_u(vint8m1_t v) { return__riscv_vreinterpret_u8m1(v); }
vuint16m1_t__riscv_vreinterpret_u(vint16m1_t); /* ... */vuint32m1_t__riscv_vreinterpret_u(vint32m1_t);
vuint64m1_t__riscv_vreinterpret_u(vint64m1_t);
vuint32m1_t__riscv_vreinterpret_u(vfloat32m1_t);
vuint64m1_t__riscv_vreinterpret_u(vfloat64m1_t);
// etc., across all LMUL and versions which set signed, unsigned, 8-bit, 16-bit, 32-bit, 64-bit
To make it possible for template code and code receiving typedef versions of vector types to change what they need to change without getting entagled with the rest of the data type.
Also:
vuint8mf4_t__riscv_vlmul_widen(vuint8mf8_t v) { return__riscv_vlmul_ext_u8mf4(v); }
vuint8mf2_t__riscv_vlmul_widen(vuint8mf4_t); /* ... */vuint8m1_t__riscv_vlmul_widen(vuint8mf2_t);
vuint8m2_t__riscv_vlmul_widen(vuint8m1_t);
vuint8m4_t__riscv_vlmul_widen(vuint8m2_t);
vuint8m8_t__riscv_vlmul_widen(vuint8m4_t);
// etc., across all element typesvuint8mf8_t__riscv_vlmul_narrow(vuint8mf4_t v) { return__riscv_vlmul_trunc_u8mf8(v); }
vuint8mf4_t__riscv_vlmul_narrow(vuint8mf2_t); /* ... */vuint8mf2_t__riscv_vlmul_narrow(vuint8m1_t);
vuint8m1_t__riscv_vlmul_narrow(vuint8m2_t);
vuint8m2_t__riscv_vlmul_narrow(vuint8m4_t);
vuint8m4_t__riscv_vlmul_narrow(vuint8m8_t);
// etc., across all element types
#if1// debatablevuint8mf8_t__riscv_vget_upper(vuint8mf4_t v ) { return__riscv_vslidedown(v, __riscv_vsetvlmax_e8mf8(), __riscv_vsetvlmax_e8mf8()); }
vuint8mf4_t__riscv_vget_upper(vuint8mf2_t); /* ... */vuint8mf2_t__riscv_vget_upper(vuint8m1_t);
#endifvuint8m1_t__riscv_vget_upper(vuint8m2_t v) { return__riscv_vget_u8m1(v, 1); }
vuint8m2_t__riscv_vget_upper(vuint8m4_t); /* ... */vuint8m4_t__riscv_vget_upper(vuint8m8_t);
// etc., across all element types
#define__riscv_vset_upper(d, v) __riscv_vset(d, 1, v) /* shouldn't accept some variants, but whatever */
#define__riscv_vget_lower __riscv_vlmul_narrow /* same operation, but with a consistent name based on intent */
#define__riscv_vjoin(a, b) __riscv_vset_upper(__riscv_vlmul_widen(a), b)
Allowing code to cope with the relative widening and narrowing of data types by factors of two under the same conditions as above.
The text was updated successfully, but these errors were encountered:
I guess there's also the element-wise widen (a form of vreinterpret), and the vlmul widen with element-wise widen at the same time; though you can cobble the latter together with the other two.
Consider overloads like:
To make it possible for template code and code receiving
typedef
versions of vector types to change what they need to change without getting entagled with the rest of the data type.Also:
Allowing code to cope with the relative widening and narrowing of data types by factors of two under the same conditions as above.
The text was updated successfully, but these errors were encountered: