MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / builtin_isinf

Function builtin_isinf

extern/half/include/half.hpp:403–419  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

401 /// \retval true if infinity
402 /// \retval false else
403 template<typename T> bool builtin_isinf(T arg)
404 {
405 #if HALF_ENABLE_CPP11_CMATH
406#ifdef __clang__
407#pragma GCC diagnostic push
408#pragma GCC diagnostic ignored "-Wtautological-constant-compare"
409#endif
410 return std::isinf(arg);
411#ifdef __clang__
412#pragma GCC diagnostic pop
413#endif
414 #elif defined(_MSC_VER)
415 return !::_finite(static_cast<double>(arg)) && !::_isnan(static_cast<double>(arg));
416 #else
417 return arg == std::numeric_limits<T>::infinity() || arg == -std::numeric_limits<T>::infinity();
418 #endif
419 }
420
421 /// Check for NaN.
422 /// \tparam T argument type (builtin floating point type)

Callers 6

float2half_implFunction · 0.85
cbrtMethod · 0.85
hypotMethod · 0.85
lgammaMethod · 0.85
tgammaMethod · 0.85
erfMethod · 0.85

Calls 2

infinityFunction · 0.85
isinfFunction · 0.70

Tested by

no test coverage detected