Temporary half-precision expression. This class represents a half-precision expression which just stores a single-precision value internally.
| 442 | /// Temporary half-precision expression. |
| 443 | /// This class represents a half-precision expression which just stores a single-precision value internally. |
| 444 | struct 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 | |
| 457 | private: |
| 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 |