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

Method log2

samples/common/half.h:1828–1835  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1826 /// \param arg function argument
1827 /// \return function value stored in single-preicision
1828 static expr log2(float arg)
1829 {
1830#if HALF_ENABLE_CPP11_CMATH
1831 return expr(std::log2(arg));
1832#else
1833 return expr(static_cast<float>(std::log(static_cast<double>(arg)) * 1.4426950408889634073599246810019));
1834#endif
1835 }
1836
1837 /// Square root implementation.
1838 /// \param arg function argument

Callers 2

remainingMethod · 0.45
remainingMethod · 0.45

Calls 3

exprClass · 0.70
log2Function · 0.70
logFunction · 0.70

Tested by

no test coverage detected