24 #ifndef ARM_COMPUTE_SUPPORT_TOOLCHAINSUPPORT 25 #define ARM_COMPUTE_SUPPORT_TOOLCHAINSUPPORT 34 #include <type_traits> 36 #ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 38 #endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 44 #define M_PI (3.14159265358979323846) 53 #if(__ANDROID__ || BARE_METAL) 57 return static_cast<T>(::
nearbyint(value));
69 template <typename T, typename = typename std::enable_if<std::is_floating_point<T>::value>
::type>
70 inline T
round(T value)
84 template <typename T, typename = typename std::enable_if<std::is_floating_point<T>::value>
::type>
85 inline T
trunc(T value)
100 template <typename T, typename = typename std::enable_if<std::is_floating_point<T>::value>
::type>
117 template < typename T, typename = typename std::enable_if < std::is_floating_point<T>::value
118 #ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 119 || std::is_same<T, float16_t>::value
120 #endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 122 inline T
fma(T x, T y, T z)
138 template <
typename... Ts>
139 inline int snprintf(
char *s,
size_t n,
const char *fmt, Ts &&...
args)
153 template <
typename T>
168 template <typename T, typename = typename std::enable_if<std::is_floating_point<T>::value>
::type>
172 return (value < 0.f) ? static_cast<int>(value - 0.5f) : static_cast<int>(value + 0.5f);
184 template <typename T, typename = typename std::enable_if<std::is_floating_point<T>::value>
::type>
200 template <typename T, typename = typename std::enable_if<std::is_floating_point<T>::value>
::type>
217 template < typename T, typename = typename std::enable_if < std::is_floating_point<T>::value
218 #ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 219 || std::is_same<T, float16_t>::value
220 #endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 222 inline T
fma(T x, T y, T z)
238 template <
typename... Ts>
239 inline int snprintf(
char *s, std::size_t n,
const char *fmt, Ts &&...
args)
246 template <
typename T>
252 #ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 254 inline __fp16 lowest<__fp16>()
267 template <typename T, typename = typename std::enable_if<std::is_arithmetic<T>::value>
::type>
T trunc(T value)
Truncate floating-point value.
Brain floating point representation class.
T copysign(T x, T y)
Composes a floating point value with the magnitude of x and the sign of y.
T nearbyint(T value)
Rounds the floating-point argument arg to an integer value in floating-point format,...
half_float::half half
16-bit floating point type
decltype(strategy::transforms) typedef type
Copyright (c) 2017-2021 Arm Limited.
static bfloat16 lowest()
Lowest representative value.
bool isfinite(bfloat16 value)
bfloat16 lowest< bfloat16 >()
T fma(T x, T y, T z)
Computes (x*y) + z as if to infinite precision and rounded only once to fit the result type.
T round(T value)
Round floating-point value with half value rounding away from zero.
int snprintf(char *s, std::size_t n, const char *fmt, Ts &&... args)
Loads the data from the given location, converts them to character string equivalents and writes the ...