libjmmcg  release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
jmmcg::LIBJMMCG_VER_NAMESPACE::fma::dbl Struct Reference

To use this functionality convert one of the doubles used in the multiply operation to this class. It will then automatically implement the m*x+c into a fused multiply-add operation. More...

#include <fma.hpp>

Public Member Functions

constexpr dbl (double const l) noexcept(true) FORCE_INLINE
 Explicitly allow implicit conversions. More...
 
 dbl (private_::dbl_mul_add const &l) noexcept(true) FORCE_INLINE
 Allow nesting of std::fma() operations. More...
 
constexpr bool operator== (const double r) const noexcept(true) FORCE_INLINE
 
constexpr bool operator== (const dbl r) const noexcept(true) FORCE_INLINE
 
constexpr private_::dbl_mul operator* (const double r) const noexcept(true) FORCE_INLINE
 
constexpr private_::dbl_mul operator* (const dbl r) const noexcept(true) FORCE_INLINE
 
constexpr private_::dbl_add operator+ (const double r) const noexcept(true) FORCE_INLINE
 
constexpr private_::dbl_sub operator- (const double r) const noexcept(true) FORCE_INLINE
 

Public Attributes

const double lhs_
 

Detailed Description

To use this functionality convert one of the doubles used in the multiply operation to this class. It will then automatically implement the m*x+c into a fused multiply-add operation.

Commutativity & associativity of the equation is supported, as is nesting and m*x-c.

See also
std::fma()

Definition at line 44 of file fma.hpp.

Constructor & Destructor Documentation

◆ dbl() [1/2]

constexpr jmmcg::LIBJMMCG_VER_NAMESPACE::fma::dbl::dbl ( double const  l)
inlineconstexprnoexcept

Explicitly allow implicit conversions.

Definition at line 120 of file fma_impl.hpp.

References lhs_.

Referenced by BOOST_AUTO_TEST_CASE().

◆ dbl() [2/2]

jmmcg::LIBJMMCG_VER_NAMESPACE::fma::dbl::dbl ( private_::dbl_mul_add const &  l)
inlinenoexcept

Allow nesting of std::fma() operations.

Definition at line 124 of file fma_impl.hpp.

References lhs_.

Referenced by BOOST_AUTO_TEST_CASE().

Member Function Documentation

◆ operator*() [1/2]

constexpr private_::dbl_mul jmmcg::LIBJMMCG_VER_NAMESPACE::fma::dbl::operator* ( const dbl  r) const
inlineconstexprnoexcept

Definition at line 138 of file fma_impl.hpp.

References lhs_, and jmmcg::LIBJMMCG_VER_NAMESPACE::fma::operator*().

Referenced by BOOST_AUTO_TEST_CASE().

◆ operator*() [2/2]

constexpr private_::dbl_mul jmmcg::LIBJMMCG_VER_NAMESPACE::fma::dbl::operator* ( const double  r) const
inlineconstexprnoexcept

◆ operator+()

constexpr private_::dbl_add jmmcg::LIBJMMCG_VER_NAMESPACE::fma::dbl::operator+ ( const double  r) const
inlineconstexprnoexcept

◆ operator-()

constexpr private_::dbl_sub jmmcg::LIBJMMCG_VER_NAMESPACE::fma::dbl::operator- ( const double  r) const
inlineconstexprnoexcept

◆ operator==() [1/2]

constexpr bool jmmcg::LIBJMMCG_VER_NAMESPACE::fma::dbl::operator== ( const dbl  r) const
inlineconstexprnoexcept

Definition at line 133 of file fma_impl.hpp.

References lhs_.

◆ operator==() [2/2]

constexpr bool jmmcg::LIBJMMCG_VER_NAMESPACE::fma::dbl::operator== ( const double  r) const
inlineconstexprnoexcept

Definition at line 128 of file fma_impl.hpp.

References lhs_.

Member Data Documentation

◆ lhs_


The documentation for this struct was generated from the following files: