| 1943 | /// \param y second operand |
| 1944 | /// \return minimum value |
| 1945 | MEGDNN_HOST MEGDNN_DEVICE static expr fmin(float x, float y) |
| 1946 | { |
| 1947 | #if HALF_ENABLE_CPP11_CMATH || defined(__CUDA_ARCH__) |
| 1948 | return expr(::fmin(x, y)); |
| 1949 | #else |
| 1950 | if(builtin_isnan(x)) |
| 1951 | return expr(y); |
| 1952 | if(builtin_isnan(y)) |
| 1953 | return expr(x); |
| 1954 | return expr(min(x, y)); |
| 1955 | #endif |
| 1956 | } |
| 1957 | |
| 1958 | /// Maximum implementation. |
| 1959 | /// \param x first operand |
nothing calls this directly
no test coverage detected