34 #define UNREACHABLE(why) __builtin_unreachable()
44 std::string s = __PRETTY_FUNCTION__;
46 auto start = s.find(
"cls_");
48 if (start==std::string::npos) {
52 for(
size_t x = start+4; x<s.size(); x++) {
53 if (s[x] ==
';' || s[x] ==
']') {
54 return s.substr(start+4, x-(start+4));
60 return "(unsupported)";
66 return (a +
b - 1) /
b;
145 const T *
const *
const *
ptr;
177 template <
typename T>
179 #if defined(__aarch64__)
190 return vl /
sizeof(T);
191 #else // !defined(__aarch64__)
192 return 16 /
sizeof(T);
193 #endif // defined(__aarch64__)
196 #ifdef ARM_COMPUTE_ENABLE_SME
200 extern unsigned int raw_vector_length();
202 template <
typename T>
204 return raw_vector_length() /
sizeof(T);
208 #endif // ARM_COMPUTE_ENABLE_SME
214 template <
typename T>
217 #ifdef ARM_COMPUTE_ENABLE_SME
219 return sme::get_vector_length<T>();
220 #endif // ARM_COMPUTE_ENABLE_SME
222 return get_vector_length<T>();
224 return 16 /
sizeof(T);
229 template <
typename T>
232 const T min =
static_cast<T
>(std::numeric_limits<T>::min());
233 const T max =
static_cast<T
>(std::numeric_limits<T>::max());
235 return std::make_tuple(min, max);
242 const float min =
static_cast<float>(-std::numeric_limits<float>::infinity());
243 const float max =
static_cast<float>(std::numeric_limits<float>::infinity());
245 return std::make_tuple(min, max);
248 #if defined(__ARM_FP16_ARGS)
253 const __fp16 min =
static_cast<__fp16
>(-std::numeric_limits<float>::infinity());
254 const __fp16 max =
static_cast<__fp16
>(std::numeric_limits<float>::infinity());
256 return std::make_tuple(min, max);
258 #endif // defined(__ARM_FP16_ARGS)