15 #ifndef __IPSDKUTIL_INSTRUCTIONSET_COMPARISON_DETAIL_AVX_ISGREATERREGIMPL_H__ 16 #define __IPSDKUTIL_INSTRUCTIONSET_COMPARISON_DETAIL_AVX_ISGREATERREGIMPL_H__ 31 typename RegMaskType<eInstructionSet::eIS_Avx, T>::Type
33 typename boost::enable_if<
34 typename boost::mpl::and_<
35 typename boost::is_integral<T>::type,
36 typename boost::mpl::equal_to<boost::mpl::int_<sizeof(T)>, boost::mpl::int_<4> >::type
40 const typename AvxType<T>::Type& in1,
41 const typename AvxType<T>::Type& in2)
43 typename RegMaskType<eInstructionSet::eIS_Avx, T>::Type out;
52 typename boost::enable_if<
53 typename boost::mpl::and_<
54 typename boost::is_integral<T>::type,
55 typename boost::mpl::equal_to<boost::mpl::int_<sizeof(T)>, boost::mpl::int_<4> >::type
59 const typename AvxType<T>::Type& in1,
60 const typename AvxType<T>::Type& in2,
61 typename RegMaskType<eInstructionSet::eIS_Avx, T>::Type& out)
65 COPY_IMM_TO_XMM(in1, in11, in12);
66 COPY_IMM_TO_XMM(in2, in21, in22);
67 __m128i out1 = IsGreaterReg<eInstructionSet::eIS_Sse2, T>::act(in11, in21);
68 __m128i out2 = IsGreaterReg<eInstructionSet::eIS_Sse2, T>::act(in12, in22);
69 COPY_XMM_TO_IMM(out1, out2, out);
73 RegMaskType<eInstructionSet::eIS_Avx, ipReal32>::Type
74 IsGreaterReg<eInstructionSet::eIS_Avx, ipReal32>::act(
75 const AvxType<ipReal32>::Type& in1,
76 const AvxType<ipReal32>::Type& in2)
78 return _mm256_cmp_ps(in1, in2, _CMP_GT_OQ);
83 IsGreaterReg<eInstructionSet::eIS_Avx, ipReal32>::act(
84 const AvxType<ipReal32>::Type& in1,
85 const AvxType<ipReal32>::Type& in2,
86 RegMaskType<eInstructionSet::eIS_Avx, ipReal32>::Type& out)
88 out = _mm256_cmp_ps(in1, in2, _CMP_GT_OQ);
92 RegMaskType<eInstructionSet::eIS_Avx, ipReal64>::Type
93 IsGreaterReg<eInstructionSet::eIS_Avx, ipReal64>::act(
94 const AvxType<ipReal64>::Type& in1,
95 const AvxType<ipReal64>::Type& in2)
97 return _mm256_cmp_pd(in1, in2, _CMP_GT_OQ);
102 IsGreaterReg<eInstructionSet::eIS_Avx, ipReal64>::act(
103 const AvxType<ipReal64>::Type& in1,
104 const AvxType<ipReal64>::Type& in2,
105 RegMaskType<eInstructionSet::eIS_Avx, ipReal64>::Type& out)
107 out = _mm256_cmp_pd(in1, in2, _CMP_GT_OQ);
119 #endif // __IPSDKUTIL_INSTRUCTIONSET_COMPARISON_DETAIL_AVX_ISGREATERREGIMPL_H__ Functions to convert from 128 (resp. 256) bits registers to 256 (resp. 128) bits registers.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Predefined types for Avx instruction set management.
Advanced Vector Extensions.
Definition: InstructionSetTypes.h:44