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

Method fmin

extern/half/include/half.hpp:2022–2033  ·  view source on GitHub ↗

Minimum implementation. \param x first operand \param y second operand \return minimum value

Source from the content-addressed store, hash-verified

2020 /// \param y second operand
2021 /// \return minimum value
2022 static expr fmin(float x, float y)
2023 {
2024 #if HALF_ENABLE_CPP11_CMATH
2025 return expr(std::fmin(x, y));
2026 #else
2027 if(builtin_isnan(x))
2028 return expr(y);
2029 if(builtin_isnan(y))
2030 return expr(x);
2031 return expr(std::min(x, y));
2032 #endif
2033 }
2034
2035 /// Maximum implementation.
2036 /// \param x first operand

Callers

nothing calls this directly

Calls 4

exprClass · 0.85
fminFunction · 0.85
builtin_isnanFunction · 0.85
minFunction · 0.50

Tested by

no test coverage detected