24 #ifndef SRC_CORE_NEON_WRAPPER_INTRINSICS_SVCVT_H
25 #define SRC_CORE_NEON_WRAPPER_INTRINSICS_SVCVT_H
26 #if defined(__ARM_FEATURE_SVE)
32 #define SVCVT_Z_TO_F32_IMPL(vtype) \
33 template <typename T> \
34 inline typename std::enable_if<std::is_same<T, float>::value, svfloat32_t>::type svcvt_z(svbool_t pg, \
37 return svcvt_f32_z(pg, a); \
40 SVCVT_Z_TO_F32_IMPL(svuint32_t)
41 SVCVT_Z_TO_F32_IMPL(svint32_t)
42 SVCVT_Z_TO_F32_IMPL(svfloat16_t)
44 #undef SVCVT_Z_TO_F32_IMPL
46 #define SVCVT_Z_TO_F16_IMPL(vtype) \
47 template <typename T> \
48 inline typename std::enable_if<std::is_same<T, float16_t>::value, svfloat16_t>::type svcvt_z(svbool_t pg, \
51 return svcvt_f16_z(pg, a); \
54 SVCVT_Z_TO_F16_IMPL(svuint32_t)
55 SVCVT_Z_TO_F16_IMPL(svint32_t)
56 SVCVT_Z_TO_F16_IMPL(svfloat32_t)
58 #undef SVCVT_Z_TO_F16_IMPL
60 #define SVCVT_Z_TO_S32_IMPL(vtype) \
61 template <typename T> \
62 inline typename std::enable_if<std::is_same<T, int32_t>::value, svint32_t>::type svcvt_z(svbool_t pg, \
65 return svcvt_s32_z(pg, a); \
68 SVCVT_Z_TO_S32_IMPL(svfloat16_t)
69 SVCVT_Z_TO_S32_IMPL(svfloat32_t)
71 #undef SVCVT_Z_TO_S32_IMPL