15 #ifndef __IPSDKUTIL_INSTRUCTIONSET_COMPARISON_DETAIL_AVX2_ISEQUALREGIMPL_H__ 16 #define __IPSDKUTIL_INSTRUCTIONSET_COMPARISON_DETAIL_AVX2_ISEQUALREGIMPL_H__ 30 typename RegMaskType<eInstructionSet::eIS_Avx2, T>::Type
32 typename boost::enable_if<
33 typename boost::mpl::and_<
34 typename boost::is_integral<T>::type,
35 typename boost::mpl::equal_to<boost::mpl::int_<sizeof(T)>, boost::mpl::int_<1> >::type
39 const typename AvxType<T>::Type& in1,
40 const typename AvxType<T>::Type& in2)
42 return _mm256_cmpeq_epi8(in1, in2);
49 typename boost::enable_if<
50 typename boost::mpl::and_<
51 typename boost::is_integral<T>::type,
52 typename boost::mpl::equal_to<boost::mpl::int_<sizeof(T)>, boost::mpl::int_<1> >::type
56 const typename AvxType<T>::Type& in1,
57 const typename AvxType<T>::Type& in2,
58 typename RegMaskType<eInstructionSet::eIS_Avx2, T>::Type& out)
60 out = _mm256_cmpeq_epi8(in1, in2);
65 typename RegMaskType<eInstructionSet::eIS_Avx2, T>::Type
67 typename boost::enable_if<
68 typename boost::mpl::and_<
69 typename boost::is_integral<T>::type,
70 typename boost::mpl::equal_to<boost::mpl::int_<sizeof(T)>, boost::mpl::int_<2> >::type
74 const typename AvxType<T>::Type& in1,
75 const typename AvxType<T>::Type& in2)
77 return _mm256_cmpeq_epi16(in1, in2);
86 typename boost::enable_if<
87 typename boost::mpl::and_<
88 typename boost::is_integral<T>::type,
89 typename boost::mpl::equal_to<boost::mpl::int_<sizeof(T)>, boost::mpl::int_<2> >::type
93 const typename AvxType<T>::Type& in1,
94 const typename AvxType<T>::Type& in2,
95 typename RegMaskType<eInstructionSet::eIS_Avx2, T>::Type& out)
97 out = _mm256_cmpeq_epi16(in1, in2);
100 template <
typename T>
102 typename RegMaskType<eInstructionSet::eIS_Avx2, T>::Type
104 typename boost::enable_if<
105 typename boost::mpl::and_<
106 typename boost::is_integral<T>::type,
107 typename boost::mpl::equal_to<boost::mpl::int_<sizeof(T)>, boost::mpl::int_<4> >::type
111 const typename AvxType<T>::Type& in1,
112 const typename AvxType<T>::Type& in2)
114 return _mm256_cmpeq_epi32(in1, in2);
117 template <
typename T>
121 typename boost::enable_if<
122 typename boost::mpl::and_<
123 typename boost::is_integral<T>::type,
124 typename boost::mpl::equal_to<boost::mpl::int_<sizeof(T)>, boost::mpl::int_<4> >::type
128 const typename AvxType<T>::Type& in1,
129 const typename AvxType<T>::Type& in2,
130 typename RegMaskType<eInstructionSet::eIS_Avx2, T>::Type& out)
132 out = _mm256_cmpeq_epi32(in1, in2);
135 template <
typename T>
137 typename RegMaskType<eInstructionSet::eIS_Avx2, T>::Type
139 typename boost::enable_if<
140 typename boost::mpl::and_<
141 typename boost::is_integral<T>::type,
142 typename boost::mpl::equal_to<boost::mpl::int_<sizeof(T)>, boost::mpl::int_<8> >::type
146 const typename AvxType<T>::Type& in1,
147 const typename AvxType<T>::Type& in2)
149 return _mm256_cmpeq_epi64(in1, in2);
152 template <
typename T>
156 typename boost::enable_if<
157 typename boost::mpl::and_<
158 typename boost::is_integral<T>::type,
159 typename boost::mpl::equal_to<boost::mpl::int_<sizeof(T)>, boost::mpl::int_<8> >::type
162 >::act(
const typename AvxType<T>::Type& in1,
163 const typename AvxType<T>::Type& in2,
164 typename RegMaskType<eInstructionSet::eIS_Avx2, T>::Type& out)
166 out = _mm256_cmpeq_epi64(in1, in2);
170 RegMaskType<eInstructionSet::eIS_Avx2, ipReal32>::Type
171 IsEqualReg<eInstructionSet::eIS_Avx2, ipReal32>::act(
172 const AvxType<ipReal32>::Type& in1,
173 const AvxType<ipReal32>::Type& in2)
175 return IsEqualReg<eInstructionSet::eIS_Avx, ipReal32>::act(in1, in2);
180 IsEqualReg<eInstructionSet::eIS_Avx2, ipReal32>::act(
181 const AvxType<ipReal32>::Type& in1,
182 const AvxType<ipReal32>::Type& in2,
183 RegMaskType<eInstructionSet::eIS_Avx2, ipReal32>::Type& out)
185 IsEqualReg<eInstructionSet::eIS_Avx, ipReal32>::act(in1, in2, out);
189 RegMaskType<eInstructionSet::eIS_Avx2, ipReal64>::Type
190 IsEqualReg<eInstructionSet::eIS_Avx2, ipReal64>::act(
191 const AvxType<ipReal64>::Type& in1,
192 const AvxType<ipReal64>::Type& in2)
194 return IsEqualReg<eInstructionSet::eIS_Avx, ipReal64>::act(in1, in2);
199 IsEqualReg<eInstructionSet::eIS_Avx2, ipReal64>::act(
200 const AvxType<ipReal64>::Type& in1,
201 const AvxType<ipReal64>::Type& in2,
202 RegMaskType<eInstructionSet::eIS_Avx2, ipReal64>::Type& out)
204 IsEqualReg<eInstructionSet::eIS_Avx, ipReal64>::act(in1, in2, out);
216 #endif // __IPSDKUTIL_INSTRUCTIONSET_COMPARISON_DETAIL_AVX2_ISEQUALREGIMPL_H__ Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
IsEqualReg<eInstructionSet::domain instructionSet, typename T, typename Enable=void> structure...
Advanced Vector Extensions 2.
Definition: InstructionSetTypes.h:48