Maximum implementation. \param x first operand \param y second operand \return maximum value
| 2024 | /// \param y second operand |
| 2025 | /// \return maximum value |
| 2026 | static expr fmax(float x, float y) |
| 2027 | { |
| 2028 | #if HALF_ENABLE_CPP11_CMATH |
| 2029 | return expr(std::fmax(x, y)); |
| 2030 | #else |
| 2031 | if(builtin_isnan(x)) |
| 2032 | return expr(y); |
| 2033 | if(builtin_isnan(y)) |
| 2034 | return expr(x); |
| 2035 | return expr(std::max(x, y)); |
| 2036 | #endif |
| 2037 | } |
| 2038 | }; |
| 2039 | template<> struct binary_specialized<half,half> |
| 2040 | { |
nothing calls this directly
no test coverage detected