IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
FmaddReg.h
Go to the documentation of this file.
1 // FmaddReg.h:
3 // -------------------
4 //
14 
15 #ifndef __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_DETAIL_AVX512_FMADDREG_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_DETAIL_AVX512_FMADDREG_H__
17 
21 #include <IPSDKUtil/InstructionSet/Arithmetic/detail/FmaddReg.h>
22 #include <IPSDKUtil/InstructionSet/Arithmetic/detail/AddReg.h>
25 
26 namespace ipsdk {
27 namespace simd {
28 namespace detail {
29 
32 
35 template <typename T>
36 struct FmaddReg<
38  T,
39  typename boost::enable_if<typename boost::is_integral<T>::type>::type>
40 {
41  static
42  IPSDK_FORCEINLINE
43  typename Avx512Type<T>::Type
44  act(const typename Avx512Type<T>::Type& in1,
45  const typename Avx512Type<T>::Type& in2,
46  const typename Avx512Type<T>::Type& in3)
47  {
50  in3);
51  }
52 
53  static
54  IPSDK_FORCEINLINE
55  void
56  act(const typename Avx512Type<T>::Type& in1,
57  const typename Avx512Type<T>::Type& in2,
58  const typename Avx512Type<T>::Type& in3,
59  typename Avx512Type<T>::Type& out)
60  {
61  typename Avx512Type<T>::Type prod;
64  }
65 };
66 
69 template <>
71 {
72  static
73  IPSDK_FORCEINLINE
75  act(const Avx512Type<ipReal32>::Type& in1,
76  const Avx512Type<ipReal32>::Type& in2,
77  const Avx512Type<ipReal32>::Type& in3)
78  {
79  return _mm512_fmadd_ps(in1, in2, in3);
80  }
81 
82  static
83  IPSDK_FORCEINLINE
84  void
85  act(const Avx512Type<ipReal32>::Type& in1,
86  const Avx512Type<ipReal32>::Type& in2,
87  const Avx512Type<ipReal32>::Type& in3,
89  {
90  out = _mm512_fmadd_ps(in1, in2, in3);
91  }
92 };
93 
96 template <>
98 {
99  static
100  IPSDK_FORCEINLINE
102  act(const Avx512Type<ipReal64>::Type& in1,
103  const Avx512Type<ipReal64>::Type& in2,
104  const Avx512Type<ipReal64>::Type& in3)
105  {
106  return _mm512_fmadd_pd(in1, in2, in3);
107  }
108 
109  static
110  IPSDK_FORCEINLINE
111  void
112  act(const Avx512Type<ipReal64>::Type& in1,
113  const Avx512Type<ipReal64>::Type& in2,
114  const Avx512Type<ipReal64>::Type& in3,
116  {
117  out = _mm512_fmadd_pd(in1, in2, in3);
118  }
119 };
120 
123 
124 } // end of namespace detail
125 } // end of namespace simd
126 } // end of namespace ipsdk
127 
128 #endif // __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_DETAIL_AVX512_FMADDREG_H__
Defines the IPSDK_FORCEINLINE.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Definition: FmaddReg.h:37
double ipReal64
Base types definition.
Definition: BaseTypes.h:57
(including fundation and byte and word instructions)
Definition: InstructionSetTypes.h:51
eInstructionSet
Enumerate for processor instruction set description.
Definition: InstructionSetTypes.h:31
Predefined types for Avx512 instruction set management.
Predefined types associated to instruction set management.
Definition of import/export macro for library.
template structure which is specialized to implement the arithmetic addition on 2 scalars or 2 regist...
Definition: AddReg.h:37
Definition: MulReg.h:39
float ipReal32
Base types definition.
Definition: BaseTypes.h:56
structure used to retrieve AVX512 type associated to a base type
Definition: Avx512Types.h:36