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

Class expr

samples/common/half.h:444–460  ·  view source on GitHub ↗

Temporary half-precision expression. This class represents a half-precision expression which just stores a single-precision value internally.

Source from the content-addressed store, hash-verified

442/// Temporary half-precision expression.
443/// This class represents a half-precision expression which just stores a single-precision value internally.
444struct expr
445{
446 /// Conversion constructor.
447 /// \param f single-precision value to convert
448 explicit HALF_CONSTEXPR expr(float f) HALF_NOEXCEPT : value_(f) {}
449
450 /// Conversion to single-precision.
451 /// \return single precision value representing expression value
452 HALF_CONSTEXPR operator float() const HALF_NOEXCEPT
453 {
454 return value_;
455 }
456
457private:
458 /// Internal expression value stored in single-precision.
459 float value_;
460};
461
462/// SFINAE helper for generic half-precision functions.
463/// This class template has to be specialized for each valid combination of argument types to provide a corresponding

Callers 15

plusMethod · 0.70
minusMethod · 0.70
multipliesMethod · 0.70
dividesMethod · 0.70
fmodMethod · 0.70
remainderMethod · 0.70
remquoMethod · 0.70
fdimMethod · 0.70
fmaMethod · 0.70
expMethod · 0.70
expm1Method · 0.70
exp2Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected