Maximum implementation. \param x first operand \param y second operand \return maximum value
| 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 | { |
nothing calls this directly
no test coverage detected