IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
IsEqualRegDecl.h
Go to the documentation of this file.
1 // IsEqualRegDecl.h:
3 // -------------------
4 //
14 
15 #ifndef __IPSDKUTIL_INSTRUCTIONSET_COMPARISON_DETAIL_AVX2_ISEQUALREGDECL_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_COMPARISON_DETAIL_AVX2_ISEQUALREGDECL_H__
17 
22 
23 #include <boost/type_traits/is_integral.hpp>
24 #include <boost/utility/enable_if.hpp>
25 
26 namespace ipsdk {
27 namespace simd {
28 namespace detail {
29 
32 
33 template <typename T>
34 struct IsEqualReg<
36  T,
37  typename boost::enable_if<
38  typename boost::mpl::and_<
39  typename boost::is_integral<T>::type,
40  typename boost::mpl::equal_to<boost::mpl::int_<sizeof(T)>, boost::mpl::int_<1> >::type
41  >::type
42  >::type
43 >
44 {
45  static IPSDK_FORCEINLINE
47  act(const typename AvxType<T>::Type& in1,
48  const typename AvxType<T>::Type& in2);
49 
50  static IPSDK_FORCEINLINE
51  void
52  act(const typename AvxType<T>::Type& in1,
53  const typename AvxType<T>::Type& in2,
55 };
56 
57 template <typename T>
58 struct IsEqualReg<
60  T,
61  typename boost::enable_if<
62  typename boost::mpl::and_<
63  typename boost::is_integral<T>::type,
64  typename boost::mpl::equal_to<boost::mpl::int_<sizeof(T)>, boost::mpl::int_<2> >::type
65  >::type
66  >::type
67 >
68 {
69  static IPSDK_FORCEINLINE
71  act(const typename AvxType<T>::Type& in1,
72  const typename AvxType<T>::Type& in2);
73 
74  static IPSDK_FORCEINLINE
75  void
76  act(const typename AvxType<T>::Type& in1,
77  const typename AvxType<T>::Type& in2,
79 };
80 
81 template <typename T>
82 struct IsEqualReg<
84  T,
85  typename boost::enable_if<
86  typename boost::mpl::and_<
87  typename boost::is_integral<T>::type,
88  typename boost::mpl::equal_to<boost::mpl::int_<sizeof(T)>, boost::mpl::int_<4> >::type
89  >::type
90  >::type
91 >
92 {
93  static IPSDK_FORCEINLINE
95  act(const typename AvxType<T>::Type& in1,
96  const typename AvxType<T>::Type& in2);
97 
98  static IPSDK_FORCEINLINE
99  void
100  act(const typename AvxType<T>::Type& in1,
101  const typename AvxType<T>::Type& in2,
103 };
104 
105 template <typename T>
106 struct IsEqualReg<
108  T,
109  typename boost::enable_if<
110  typename boost::mpl::and_<
111  typename boost::is_integral<T>::type,
112  typename boost::mpl::equal_to<boost::mpl::int_<sizeof(T)>, boost::mpl::int_<8> >::type
113  >::type
114  >::type
115 >
116 {
117  static IPSDK_FORCEINLINE
119  act(const typename AvxType<T>::Type& in1,
120  const typename AvxType<T>::Type& in2);
121 
122  static IPSDK_FORCEINLINE
123  void
124  act(const typename AvxType<T>::Type& in1,
125  const typename AvxType<T>::Type& in2,
127 };
128 
129 template <>
130 struct IsEqualReg<
132 {
133  static IPSDK_FORCEINLINE
135  act(const AvxType<ipReal32>::Type& in1,
136  const AvxType<ipReal32>::Type& in2);
137 
138  static IPSDK_FORCEINLINE
139  void
140  act(const AvxType<ipReal32>::Type& in1,
141  const AvxType<ipReal32>::Type& in2,
143 };
144 
145 template <>
146 struct IsEqualReg<
148 {
149  static IPSDK_FORCEINLINE
151  act(const AvxType<ipReal64>::Type& in1,
152  const AvxType<ipReal64>::Type& in2);
153 
154  static IPSDK_FORCEINLINE
155  void
156  act(const AvxType<ipReal64>::Type& in1,
157  const AvxType<ipReal64>::Type& in2,
159 };
160 
163 
164 } // end of namespace detail
165 } // end of namespace simd
166 } // end of namespace ipsdk
167 
168 #endif // __IPSDKUTIL_INSTRUCTIONSET_COMPARISON_DETAIL_AVX2_ISEQUALREGDECL_H__
Defines the IPSDK_FORCEINLINE.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Definition: IsEqualRegDecl.h:35
double ipReal64
Base types definition.
Definition: BaseTypes.h:57
Predefined types for Avx instruction set management.
eInstructionSet
Enumerate for processor instruction set description.
Definition: InstructionSetTypes.h:31
Advanced Vector Extensions 2.
Definition: InstructionSetTypes.h:48
Definition of import/export macro for library.
Definition: RegMaskType.h:29
IsEqualReg<eInstructionSet::domain instructionSet, typename T, typename Enable=void> structure...
structure used to retrieve AVX type associated to a base type
Definition: AvxTypes.h:33
float ipReal32
Base types definition.
Definition: BaseTypes.h:56