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

The set of contained classes implements a DSEL that allows one to more naturally make use of the fma() operation using the natural mathematical operators of which std::fma() implements: * and + (or -). More...

Namespaces

namespace  private_
 

Classes

struct  dbl
 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...
 

Functions

constexpr private_::dbl_mul_add operator+ (const dbl a, private_::dbl_mul const &d) noexcept(true) FORCE_INLINE
 
constexpr private_::dbl_mul_add operator- (const dbl a, private_::dbl_mul const &d) noexcept(true) FORCE_INLINE
 
constexpr private_::dbl_mul operator* (const double l, dbl const r) noexcept(true) FORCE_INLINE
 
std::ostream & operator<< (std::ostream &os, dbl const d) noexcept(false) FORCE_INLINE
 

Detailed Description

The set of contained classes implements a DSEL that allows one to more naturally make use of the fma() operation using the natural mathematical operators of which std::fma() implements: * and + (or -).

Function Documentation

◆ operator*()

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

◆ operator+()

constexpr private_::dbl_mul_add jmmcg::LIBJMMCG_VER_NAMESPACE::fma::operator+ ( const dbl  a,
private_::dbl_mul const &  d 
)
inlineconstexprnoexcept

Allow associativity regarding the additions.

Definition at line 158 of file fma_impl.hpp.

References jmmcg::LIBJMMCG_VER_NAMESPACE::fma::private_::dbl_mul_add::dbl_mul_add(), and jmmcg::LIBJMMCG_VER_NAMESPACE::fma::dbl::lhs_.

Referenced by BOOST_AUTO_TEST_CASE().

◆ operator-()

◆ operator<<()

std::ostream & jmmcg::LIBJMMCG_VER_NAMESPACE::fma::operator<< ( std::ostream &  os,
dbl const  d 
)
inlinenoexcept

Definition at line 172 of file fma_impl.hpp.

References jmmcg::LIBJMMCG_VER_NAMESPACE::fma::dbl::lhs_.