24 #ifndef ACL_SRC_CORE_NEON_WRAPPER_TRAITS_H
25 #define ACL_SRC_CORE_NEON_WRAPPER_TRAITS_H
29 #if defined(__ARM_FEATURE_FP16_VECTOR_ARITHMETIC)
31 #endif // defined(__ARM_FEATURE_FP16_VECTOR_ARITHMETIC)
35 #if defined(ARM_COMPUTE_ENABLE_SVE) && defined(__ARM_FEATURE_SVE)
60 #ifndef DOXYGEN_SKIP_THIS
63 template <>
struct neon_vector<uint8_t, 16>{
using scalar_type = uint8_t;
using type = uint8x16_t;
using tag_type = vector_128_tag; };
64 template <>
struct neon_vector<int8_t, 16>{
using scalar_type = int8_t;
using type = int8x16_t;
using tag_type = vector_128_tag; };
65 template <>
struct neon_vector<uint16_t, 4>{
using scalar_type = uint16_t;
using type = uint16x4_t;
using tag_type = vector_64_tag; };
66 template <>
struct neon_vector<int16_t, 4>{
using scalar_type = int16_t;
using type = int16x4_t;
using tag_type = vector_64_tag; };
67 template <>
struct neon_vector<uint16_t, 8>{
using scalar_type = uint16_t;
using type = uint16x8_t;
using tag_type = vector_128_tag; };
68 template <>
struct neon_vector<uint16_t, 16>{
using scalar_type = uint16_t;
using type = uint16x8x2_t; };
69 template <>
struct neon_vector<int16_t, 8>{
using scalar_type = int16_t;
using type = int16x8_t;
using tag_type = vector_128_tag; };
70 template <>
struct neon_vector<int16_t, 16>{
using scalar_type = int16_t;
using type = int16x8x2_t; };
71 template <>
struct neon_vector<uint32_t, 2>{
using scalar_type = uint32_t;
using type = uint32x2_t;
using tag_type = vector_64_tag; };
72 template <>
struct neon_vector<int32_t, 2>{
using scalar_type = int32_t;
using type = int32x2_t;
using tag_type = vector_64_tag; };
73 template <>
struct neon_vector<uint32_t, 4>{
using scalar_type = uint32_t;
using type = uint32x4_t;
using tag_type = vector_128_tag; };
74 template <>
struct neon_vector<int32_t, 4>{
using scalar_type = int32_t;
using type = int32x4_t;
using tag_type = vector_128_tag; };
75 template <>
struct neon_vector<uint64_t, 1>{
using scalar_type = uint64_t;
using type = uint64x1_t;
using tag_type = vector_64_tag; };
76 template <>
struct neon_vector<int64_t, 1>{
using scalar_type = int64_t;
using type = int64x1_t;
using tag_type = vector_64_tag; };
77 template <>
struct neon_vector<uint64_t, 2>{
using scalar_type = uint64_t;
using type = uint64x2_t;
using tag_type = vector_128_tag; };
78 template <>
struct neon_vector<int64_t, 2>{
using scalar_type = int64_t;
using type = int64x2_t;
using tag_type = vector_128_tag; };
79 template <>
struct neon_vector<float_t, 2>{
using scalar_type = float_t;
using type = float32x2_t;
using tag_type = vector_64_tag; };
80 template <>
struct neon_vector<float_t, 4>{
using scalar_type = float_t;
using type = float32x4_t;
using tag_type = vector_128_tag; };
82 #ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
83 template <>
struct neon_vector<float16_t, 4>{
using scalar_type = float16_t;
using type = float16x4_t;
using tag_type = vector_64_tag; };
84 template <>
struct neon_vector<float16_t, 8>{
using scalar_type = float16_t;
using type = float16x8_t;
using tag_type = vector_128_tag; };
85 #endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
103 #ifndef DOXYGEN_SKIP_THIS
106 template <>
struct neon_bitvector<uint8_t,
BitWidth::W128>{
using type = uint8x16_t;
using tag_type = vector_128_tag; };
107 template <>
struct neon_bitvector<int8_t,
BitWidth::W128>{
using type = int8x16_t;
using tag_type = vector_128_tag; };
108 template <>
struct neon_bitvector<uint16_t,
BitWidth::W64>{
using type = uint16x4_t;
using tag_type = vector_64_tag; };
109 template <>
struct neon_bitvector<int16_t,
BitWidth::
W64>{
using type = int16x4_t;
using tag_type = vector_64_tag; };
110 template <>
struct neon_bitvector<uint16_t,
BitWidth::
W128>{
using type = uint16x8_t;
using tag_type = vector_128_tag; };
111 template <>
struct neon_bitvector<int16_t,
BitWidth::
W128>{
using type = int16x8_t;
using tag_type = vector_128_tag; };
112 template <>
struct neon_bitvector<uint32_t,
BitWidth::
W64>{
using type = uint32x2_t;
using tag_type = vector_64_tag; };
113 template <>
struct neon_bitvector<int32_t,
BitWidth::
W64>{
using type = int32x2_t;
using tag_type = vector_64_tag; };
114 template <>
struct neon_bitvector<uint32_t,
BitWidth::
W128>{
using type = uint32x4_t;
using tag_type = vector_128_tag; };
115 template <>
struct neon_bitvector<int32_t,
BitWidth::
W128>{
using type = int32x4_t;
using tag_type = vector_128_tag; };
116 template <>
struct neon_bitvector<uint64_t,
BitWidth::
W64>{
using type = uint64x1_t;
using tag_type = vector_64_tag; };
117 template <>
struct neon_bitvector<int64_t,
BitWidth::
W64>{
using type = int64x1_t;
using tag_type = vector_64_tag; };
118 template <>
struct neon_bitvector<uint64_t,
BitWidth::
W128>{
using type = uint64x2_t;
using tag_type = vector_128_tag; };
119 template <>
struct neon_bitvector<int64_t,
BitWidth::
W128>{
using type = int64x2_t;
using tag_type = vector_128_tag; };
120 template <>
struct neon_bitvector<float_t,
BitWidth::
W64>{
using type = float32x2_t;
using tag_type = vector_64_tag; };
121 template <>
struct neon_bitvector<float_t,
BitWidth::
W128>{
using type = float32x4_t;
using tag_type = vector_128_tag; };
122 #ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
123 template <>
struct neon_bitvector<float16_t,
BitWidth::
W64>{
using type = float16x4_t;
using tag_type = vector_64_tag; };
124 template <>
struct neon_bitvector<float16_t,
BitWidth::
W128>{
using type = float16x8_t;
using tag_type = vector_128_tag; };
125 #endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
128 #if defined(ARM_COMPUTE_ENABLE_SVE) && defined(__ARM_FEATURE_SVE)
130 template <
typename T>
struct sve_vector;
132 template <>
struct sve_vector<uint8_t>{
using scalar_type = uint8_t;
using type = svuint8_t; };
133 template <>
struct sve_vector<int8_t>{
using scalar_type = int8_t;
using type = svint8_t; };
155 template <
typename T>
163 #endif // ACL_SRC_CORE_NEON_WRAPPER_TRAITS_H