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) 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 long lround(T value)
99 template <typename T, typename = typename std::enable_if<std::is_floating_point<T>::value>
::type>
100 inline T
trunc(T value)
115 template <typename T, typename = typename std::enable_if<std::is_floating_point<T>::value>
::type>
132 template < typename T, typename = typename std::enable_if < std::is_floating_point<T>::value
133 #ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 134 || std::is_same<T, float16_t>::value
135 #endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 137 inline T
fma(T x, T y, T z)
153 template <
typename... Ts>
154 inline int snprintf(
char *s,
size_t n,
const char *fmt, Ts &&...
args)
168 template <
typename T>
183 template <typename T, typename = typename std::enable_if<std::is_floating_point<T>::value>
::type>
187 return (value < 0.f) ?
static_cast<int>(value - 0.5f) : static_cast<int>(value + 0.5f);
199 template <typename T, typename = typename std::enable_if<std::is_floating_point<T>::value>
::type>
214 template <typename T, typename = typename std::enable_if<std::is_floating_point<T>::value>
::type>
230 template <typename T, typename = typename std::enable_if<std::is_floating_point<T>::value>
::type>
247 template < typename T, typename = typename std::enable_if < std::is_floating_point<T>::value
248 #ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 249 || std::is_same<T, float16_t>::value
250 #endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 252 inline T
fma(T x, T y, T z)
268 template <
typename... Ts>
269 inline int snprintf(
char *s, std::size_t n,
const char *fmt, Ts &&...
args)
276 template <
typename T>
282 #ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 284 inline __fp16 lowest<__fp16>()
297 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, using the current rounding mode.
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.
long lround(T value)
Round floating-point value with half value rounding away from zero and cast to long.
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 ...