MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / fdim

Method fdim

samples/common/half.h:1735–1742  ·  view source on GitHub ↗

Positive difference implementation. \param x first operand \param y second operand \return Positive difference stored in single-precision

Source from the content-addressed store, hash-verified

1733 /// \param y second operand
1734 /// \return Positive difference stored in single-precision
1735 static expr fdim(float x, float y)
1736 {
1737#if HALF_ENABLE_CPP11_CMATH
1738 return expr(std::fdim(x, y));
1739#else
1740 return expr((x <= y) ? 0.0f : (x - y));
1741#endif
1742 }
1743
1744 /// Fused multiply-add implementation.
1745 /// \param x first operand

Callers

nothing calls this directly

Calls 2

exprClass · 0.70
fdimFunction · 0.70

Tested by

no test coverage detected