IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
IsLessEqualRegImpl.h
Go to the documentation of this file.
1 // IsLessEqualRegImpl.h:
3 // -------------------
4 //
14 
15 #ifndef __IPSDKUTIL_INSTRUCTIONSET_COMPARISON_DETAIL_AVX_ISLESSEQUALREGIMPL_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_COMPARISON_DETAIL_AVX_ISLESSEQUALREGIMPL_H__
17 
21 
22 namespace ipsdk {
23 namespace simd {
24 namespace detail {
25 
28 
29 IPSDK_FORCEINLINE
30 RegMaskType<eInstructionSet::eIS_Avx, ipReal32>::Type
31 IsLessEqualReg<eInstructionSet::eIS_Avx, ipReal32>::act(
32  const AvxType<ipReal32>::Type& in1,
33  const AvxType<ipReal32>::Type& in2)
34 {
35  return _mm256_cmp_ps(in1, in2, _CMP_LE_OQ);
36 }
37 
38 IPSDK_FORCEINLINE
39 RegMaskType<eInstructionSet::eIS_Avx, ipReal32>::Type
40 IsLessEqualReg<eInstructionSet::eIS_Avx, ipReal32>::act(
41  const AvxType<ipReal32>::Type& in1,
42  const ipReal32& in2)
43 {
44  const AvxType<ipReal32>::Type regIn2 =
45  AssignReg<eInstructionSet::eIS_Avx, ipReal32>::act(in2);
46  return _mm256_cmp_ps(in1, regIn2, _CMP_LE_OQ);
47 }
48 
49 IPSDK_FORCEINLINE
50 void
51 IsLessEqualReg<eInstructionSet::eIS_Avx, ipReal32>::act(
52  const AvxType<ipReal32>::Type& in1,
53  const AvxType<ipReal32>::Type& in2,
54  RegMaskType<eInstructionSet::eIS_Avx, ipReal32>::Type& out)
55 {
56  out = _mm256_cmp_ps(in1, in2, _CMP_LE_OQ);
57 }
58 
59 IPSDK_FORCEINLINE
60 void
61 IsLessEqualReg<eInstructionSet::eIS_Avx, ipReal32>::act(
62  const AvxType<ipReal32>::Type& in1,
63  const ipReal32& in2,
64  RegMaskType<eInstructionSet::eIS_Avx, ipReal32>::Type& out)
65 {
66  const AvxType<ipReal32>::Type regIn2 =
67  AssignReg<eInstructionSet::eIS_Avx, ipReal32>::act(in2);
68  out = _mm256_cmp_ps(in1, regIn2, _CMP_LE_OQ);
69 }
70 
71 IPSDK_FORCEINLINE
72 RegMaskType<eInstructionSet::eIS_Avx, ipReal64>::Type
73 IsLessEqualReg<eInstructionSet::eIS_Avx, ipReal64>::act(
74  const AvxType<ipReal64>::Type& in1,
75  const AvxType<ipReal64>::Type& in2)
76 {
77  return _mm256_cmp_pd(in1, in2, _CMP_LE_OQ);
78 }
79 
80 IPSDK_FORCEINLINE
81 RegMaskType<eInstructionSet::eIS_Avx, ipReal64>::Type
82 IsLessEqualReg<eInstructionSet::eIS_Avx, ipReal64>::act(
83  const AvxType<ipReal64>::Type& in1,
84  const ipReal64& in2)
85 {
86  const AvxType<ipReal64>::Type regIn2 =
87  AssignReg<eInstructionSet::eIS_Avx, ipReal64>::act(in2);
88  return _mm256_cmp_pd(in1, regIn2, _CMP_LE_OQ);
89 }
90 
91 IPSDK_FORCEINLINE
92 void
93 IsLessEqualReg<eInstructionSet::eIS_Avx, ipReal64>::act(
94  const AvxType<ipReal64>::Type& in1,
95  const AvxType<ipReal64>::Type& in2,
96  RegMaskType<eInstructionSet::eIS_Avx, ipReal64>::Type& out)
97 {
98  out = _mm256_cmp_pd(in1, in2, _CMP_LE_OQ);
99 }
100 
101 IPSDK_FORCEINLINE
102 void
103 IsLessEqualReg<eInstructionSet::eIS_Avx, ipReal64>::act(
104  const AvxType<ipReal64>::Type& in1,
105  const ipReal64& in2,
106  RegMaskType<eInstructionSet::eIS_Avx, ipReal64>::Type& out)
107 {
108  const AvxType<ipReal64>::Type regIn2 =
109  AssignReg<eInstructionSet::eIS_Avx, ipReal64>::act(in2);
110  out = _mm256_cmp_pd(in1, regIn2, _CMP_LE_OQ);
111 }
112 
115 
116 } // end of namespace detail
117 } // end of namespace simd
118 } // end of namespace ipsdk
119 
120 #endif // __IPSDKUTIL_INSTRUCTIONSET_COMPARISON_DETAIL_AVX_ISLESSEQUALREGIMPL_H__
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
double ipReal64
Base types definition.
Definition: BaseTypes.h:57
Predefined types for Avx instruction set management.
float ipReal32
Base types definition.
Definition: BaseTypes.h:56