35 #ifndef _BLAZE_MATH_SIMD_FMA_H_ 36 #define _BLAZE_MATH_SIMD_FMA_H_ 96 #if BLAZE_FMA_MODE && BLAZE_MIC_MODE 98 return _mm512_fmadd_ps(
a_.eval().value,
b_.eval().value,
c_.eval().value );
100 #elif BLAZE_FMA_MODE && BLAZE_AVX_MODE 102 return _mm256_fmadd_ps(
a_.eval().value,
b_.eval().value,
c_.eval().value );
104 #elif BLAZE_FMA_MODE && BLAZE_SSE2_MODE 106 return _mm_fmadd_ps(
a_.eval().value,
b_.eval().value,
c_.eval().value );
129 template<
typename T1
159 #if BLAZE_FMA_MODE && BLAZE_MIC_MODE 161 return _mm512_fmsub_ps(
a_.eval().value,
b_.eval().value,
c_.eval().value );
163 #elif BLAZE_FMA_MODE && BLAZE_AVX_MODE 165 return _mm256_fmsub_ps(
a_.eval().value,
b_.eval().value,
c_.eval().value );
167 #elif BLAZE_FMA_MODE && BLAZE_SSE2_MODE 169 return _mm_fmsub_ps(
a_.eval().value,
b_.eval().value,
c_.eval().value );
198 template<
typename T1
223 template<
typename T1
249 template<
typename T1
278 template<
typename T1
285 return ( a.
a_ * a.
b_ ) + ( a.
c_ + (~b) );
307 template<
typename T1
314 return ( b.
a_ * b.
b_ ) + ( b.
c_ + (~a) );
336 template<
typename T1
366 template<
typename T1
395 template<
typename T1
404 return ( a.
a_ * a.
b_ ) + ( ( b.
a_ * b.
b_ ) + ( a.
c_ + b.
c_ ) );
425 template<
typename T1
434 return ( a.
a_ * a.
b_ ) + ( ( b.
a_ * b.
b_ ) + ( a.
c_ - b.
c_ ) );
455 template<
typename T1
464 return ( a.
a_ * a.
b_ ) + ( ( b.
a_ * b.
b_ ) + ( b.
c_ - a.
c_ ) );
485 template<
typename T1
494 return ( a.
a_ * a.
b_ ) + ( ( b.
a_ * b.
b_ ) - ( b.
c_ + a.
c_ ) );
514 template<
typename T1
540 template<
typename T1
569 template<
typename T1
576 return ( a.
a_ * a.
b_ ) - ( a.
c_ + (~b) );
598 template<
typename T1
606 return ( a.
a_ * a.
b_ ) - ( b.
a_ * b.
b_ + a.
c_ );
628 template<
typename T1
657 template<
typename T1
666 return ( a.
a_ * a.
b_ ) - ( ( b.
a_ * b.
b_ ) + ( b.
c_ - a.
c_ ) );
687 template<
typename T1
696 return ( a.
a_ * a.
b_ ) - ( ( b.
a_ * b.
b_ ) - ( a.
c_ + b.
c_ ) );
717 template<
typename T1
726 return ( a.
a_ * a.
b_ ) - ( ( b.
a_ * b.
b_ ) + ( a.
c_ + b.
c_ ) );
747 template<
typename T1
756 return ( a.
a_ * a.
b_ ) - ( ( b.
a_ * b.
b_ ) + ( a.
c_ - b.
c_ ) );
778 template<
typename T1
808 #if BLAZE_FMA_MODE && BLAZE_MIC_MODE 810 return _mm512_fmadd_pd(
a_.eval().value,
b_.eval().value,
c_.eval().value );
812 #elif BLAZE_FMA_MODE && BLAZE_AVX_MODE 814 return _mm256_fmadd_pd(
a_.eval().value,
b_.eval().value,
c_.eval().value );
816 #elif BLAZE_FMA_MODE && BLAZE_SSE2_MODE 818 return _mm_fmadd_pd(
a_.eval().value,
b_.eval().value,
c_.eval().value );
841 template<
typename T1
871 #if BLAZE_FMA_MODE && BLAZE_MIC_MODE 873 return _mm512_fmsub_pd(
a_.eval().value,
b_.eval().value,
c_.eval().value );
875 #elif BLAZE_FMA_MODE && BLAZE_AVX_MODE 877 return _mm256_fmsub_pd(
a_.eval().value,
b_.eval().value,
c_.eval().value );
879 #elif BLAZE_FMA_MODE && BLAZE_SSE2_MODE 881 return _mm_fmsub_pd(
a_.eval().value,
b_.eval().value,
c_.eval().value );
910 template<
typename T1
935 template<
typename T1
961 template<
typename T1
990 template<
typename T1
997 return ( a.
a_ * a.
b_ ) + ( a.
c_ + (~b) );
1019 template<
typename T1
1026 return ( b.
a_ * b.
b_ ) + ( b.
c_ + (~a) );
1048 template<
typename T1
1078 template<
typename T1
1107 template<
typename T1
1116 return ( a.
a_ * a.
b_ ) + ( ( b.
a_ * b.
b_ ) + ( a.
c_ + b.
c_ ) );
1137 template<
typename T1
1146 return ( a.
a_ * a.
b_ ) + ( ( b.
a_ * b.
b_ ) + ( a.
c_ - b.
c_ ) );
1167 template<
typename T1
1176 return ( a.
a_ * a.
b_ ) + ( ( b.
a_ * b.
b_ ) + ( b.
c_ - a.
c_ ) );
1197 template<
typename T1
1206 return ( a.
a_ * a.
b_ ) + ( ( b.
a_ * b.
b_ ) - ( b.
c_ + a.
c_ ) );
1226 template<
typename T1
1252 template<
typename T1
1281 template<
typename T1
1288 return ( a.
a_ * a.
b_ ) - ( a.
c_ + (~b) );
1310 template<
typename T1
1318 return ( a.
a_ * a.
b_ ) - ( b.
a_ * b.
b_ + a.
c_ );
1340 template<
typename T1
1369 template<
typename T1
1378 return ( a.
a_ * a.
b_ ) - ( ( b.
a_ * b.
b_ ) + ( b.
c_ - a.
c_ ) );
1399 template<
typename T1
1408 return ( a.
a_ * a.
b_ ) - ( ( b.
a_ * b.
b_ ) - ( a.
c_ + b.
c_ ) );
1429 template<
typename T1
1438 return ( a.
a_ * a.
b_ ) - ( ( b.
a_ * b.
b_ ) + ( a.
c_ + b.
c_ ) );
1459 template<
typename T1
1468 return ( a.
a_ * a.
b_ ) - ( ( b.
a_ * b.
b_ ) + ( a.
c_ - b.
c_ ) );
Addition operator for fusing a 32-bit floating point multiplication and addition. ...
Definition: FMA.h:781
Expression object for 64-bit floating point fused multiply-subtract operations.The SIMDf64FmsubExpr c...
Definition: FMA.h:844
const T1 a_
The left-hand side operand for the multiplication.
Definition: FMA.h:826
Expression object for 64-bit floating point multiplication operations.The SIMDf64MultExpr class repre...
Definition: Multiplication.h:710
Expression object for 32-bit floating point fused multiply-subtract operations.The SIMDf32FmsubExpr c...
Definition: FMA.h:132
Header file for the SIMD subtraction functionality.
const T3 c_
The right-hand side operand for the addition.
Definition: FMA.h:828
const DenseIterator< Type, AF > operator+(const DenseIterator< Type, AF > &it, ptrdiff_t inc) noexcept
Addition between a DenseIterator and an integral value.
Definition: DenseIterator.h:699
Header file for the SIMD multiplication functionality.
BLAZE_ALWAYS_INLINE SIMDf64FmaddExpr(const T1 &a, const T2 &b, const T3 &c)
Constructor for the SIMDf64FmaddExpr class.
Definition: FMA.h:795
Expression object for 32-bit floating point fused multiply-add operations.The SIMDf32FmaddExpr class ...
Definition: FMA.h:69
const DenseIterator< Type, AF > operator-(const DenseIterator< Type, AF > &it, ptrdiff_t inc) noexcept
Subtraction between a DenseIterator and an integral value.
Definition: DenseIterator.h:731
SIMDf64< This > BaseType
Base type of this SIMDf64FMaddExpr instance.
Definition: FMA.h:785
SIMD type for 64-bit double precision floating point data values.
SIMDf32< This > BaseType
Base type of this SIMDf32FMaddExpr instance.
Definition: FMA.h:73
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
const T2 b_
The right-hand side operand for the multiplication.
Definition: Multiplication.h:754
BLAZE_ALWAYS_INLINE const SIMDfloat eval() const noexcept=delete
Evaluation of the expression object.
Header file for the basic SIMD types.
SIMDf32< This > BaseType
Base type of this SIMDf32FMsubExpr instance.
Definition: FMA.h:136
const T2 b_
The right-hand side operand for the multiplication.
Definition: FMA.h:827
const T1 a_
The left-hand side operand for the multiplication.
Definition: Multiplication.h:566
SIMDf64< This > BaseType
Base type of this SIMDf64FMsubExpr instance.
Definition: FMA.h:848
const T1 a_
The left-hand side operand for the multiplication.
Definition: FMA.h:889
BLAZE_ALWAYS_INLINE SIMDf32FmsubExpr(const T1 &a, const T2 &b, const T3 &c)
Constructor for the SIMDf32FmsubExpr class.
Definition: FMA.h:146
SIMD type for 32-bit single precision floating point data values.
const T1 a_
The left-hand side operand for the multiplication.
Definition: FMA.h:114
BLAZE_ALWAYS_INLINE SIMDf64FmsubExpr(const T1 &a, const T2 &b, const T3 &c)
Constructor for the SIMDf64FmsubExpr class.
Definition: FMA.h:858
const T1 a_
The left-hand side operand for the multiplication.
Definition: FMA.h:177
Header file for the SIMD addition functionality.
System settings for the SSE mode.
const T2 b_
The right-hand side operand for the multiplication.
Definition: FMA.h:178
Expression object for 32-bit floating point multiplication operations.The SIMDf32MultExpr class repre...
Definition: Multiplication.h:523
const T2 b_
The right-hand side operand for the multiplication.
Definition: Multiplication.h:567
const T2 b_
The right-hand side operand for the multiplication.
Definition: FMA.h:115
System settings for the inline keywords.
BLAZE_ALWAYS_INLINE SIMDf32FmaddExpr(const T1 &a, const T2 &b, const T3 &c)
Constructor for the SIMDf32FmaddExpr class.
Definition: FMA.h:83
const T2 b_
The right-hand side operand for the multiplication.
Definition: FMA.h:890
const T1 a_
The left-hand side operand for the multiplication.
Definition: Multiplication.h:753
const T3 c_
The right-hand side operand for the subtraction.
Definition: FMA.h:179
const T3 c_
The right-hand side operand for the subtraction.
Definition: FMA.h:891
const T3 c_
The right-hand side operand for the addition.
Definition: FMA.h:116