libjmmcg  build_2783
A C++ library containing an eclectic mix of useful, advanced components.
jmmcg::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...
 
constexpr 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 77 of file fma.hpp.

Constructor & Destructor Documentation

◆ dbl() [1/2]

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

Explicitly allow implicit conversions.

Definition at line 155 of file fma_impl.hpp.

◆ dbl() [2/2]

constexpr jmmcg::fma::dbl::dbl ( private_::dbl_mul_add const &  l)
inlineconstexprnoexcept

Allow nesting of std::fma() operations.

Definition at line 159 of file fma_impl.hpp.

Member Function Documentation

◆ operator*() [1/2]

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

Definition at line 173 of file fma_impl.hpp.

◆ operator*() [2/2]

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

Definition at line 178 of file fma_impl.hpp.

◆ operator+()

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

Definition at line 183 of file fma_impl.hpp.

◆ operator-()

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

Definition at line 188 of file fma_impl.hpp.

◆ operator==() [1/2]

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

Definition at line 168 of file fma_impl.hpp.

◆ operator==() [2/2]

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

Definition at line 163 of file fma_impl.hpp.

Member Data Documentation

◆ lhs_

const double jmmcg::fma::dbl::lhs_

Definition at line 78 of file fma.hpp.


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