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

Method exp2

samples/common/half.h:1788–1795  ·  view source on GitHub ↗

Binary exponential implementation. \param arg function argument \return function value stored in single-preicision

Source from the content-addressed store, hash-verified

1786 /// \param arg function argument
1787 /// \return function value stored in single-preicision
1788 static expr exp2(float arg)
1789 {
1790#if HALF_ENABLE_CPP11_CMATH
1791 return expr(std::exp2(arg));
1792#else
1793 return expr(static_cast<float>(std::exp(arg * 0.69314718055994530941723212145818)));
1794#endif
1795 }
1796
1797 /// Logarithm implementation.
1798 /// \param arg function argument

Callers

nothing calls this directly

Calls 3

exprClass · 0.70
exp2Function · 0.70
expFunction · 0.70

Tested by

no test coverage detected