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

Method fmin

dnn/include/megdnn/dtype/half.hpp:1945–1956  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

exprClass · 0.70
fminFunction · 0.70
builtin_isnanFunction · 0.70
minFunction · 0.50

Tested by

no test coverage detected