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

Method fmax

extern/half/include/half.hpp:2039–2050  ·  view source on GitHub ↗

Maximum implementation. \param x first operand \param y second operand \return maximum value

Source from the content-addressed store, hash-verified

2037 /// \param y second operand
2038 /// \return maximum value
2039 static expr fmax(float x, float y)
2040 {
2041 #if HALF_ENABLE_CPP11_CMATH
2042 return expr(std::fmax(x, y));
2043 #else
2044 if(builtin_isnan(x))
2045 return expr(y);
2046 if(builtin_isnan(y))
2047 return expr(x);
2048 return expr(std::max(x, y));
2049 #endif
2050 }
2051 };
2052 template<> struct binary_specialized<half,half>
2053 {

Callers

nothing calls this directly

Calls 4

exprClass · 0.85
fmaxFunction · 0.85
builtin_isnanFunction · 0.85
maxFunction · 0.50

Tested by

no test coverage detected