IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
IsGreaterEqualRegImpl.h
1 // IsGreaterEqualImpl.h:
3 // -------------------
4 //
16 
17 #ifndef __IPSDKUTIL_INSTRUCTIONSET_COMPARISON_DETAIL_SSE2_ISGREATEREQUALIMPL_H__
18 #define __IPSDKUTIL_INSTRUCTIONSET_COMPARISON_DETAIL_SSE2_ISGREATEREQUALIMPL_H__
19 
20 #include <IPSDKUtil/InstructionSet/Comparison/detail/SSE2/IsGreaterEqualRegDecl.h>
23 
24 namespace ipsdk {
25 namespace simd {
26 namespace detail {
27 
30 
33 template <typename T>
34 IPSDK_FORCEINLINE
35 typename RegMaskType<eInstructionSet::eIS_Sse2, T>::Type
36 IsGreaterEqualReg<eInstructionSet::eIS_Sse2, T,
37  typename boost::enable_if_c<
38  boost::is_integral<T>::value
39  >::type
40 >::act(
41  const typename Sse2Type<T>::Type& in1,
42  const typename Sse2Type<T>::Type& in2)
43 {
44  return BitwiseNotReg<eInstructionSet::eIS_Sse2, T>::act(
45  IsLessReg<eInstructionSet::eIS_Sse2, T>::act(in1, in2));
46 }
47 
48 template <typename T>
49 IPSDK_FORCEINLINE
50 void
51 IsGreaterEqualReg<eInstructionSet::eIS_Sse2, T,
52  typename boost::enable_if_c<
53  boost::is_integral<T>::value
54  >::type
55 >::act(
56  const typename Sse2Type<T>::Type& in1,
57  const typename Sse2Type<T>::Type& in2,
58  typename RegMaskType<eInstructionSet::eIS_Sse2, T>::Type& out)
59 {
60  IsLessReg<eInstructionSet::eIS_Sse2, T>::act(in1, in2, out);
61  BitwiseNotReg<eInstructionSet::eIS_Sse2, T>::act(out, out);
62 }
63 
65 IPSDK_FORCEINLINE
66 RegMaskType<eInstructionSet::eIS_Sse2, ipReal32>::Type
67 IsGreaterEqualReg<eInstructionSet::eIS_Sse2, ipReal32>::act(
68  const Sse2Type<ipReal32>::Type& in1,
69  const Sse2Type<ipReal32>::Type& in2)
70 {
71  return _mm_cmpge_ps(in1, in2);
72 }
73 
74 IPSDK_FORCEINLINE
75 void
76 IsGreaterEqualReg<eInstructionSet::eIS_Sse2, ipReal32>::act(
77  const Sse2Type<ipReal32>::Type& in1,
78  const Sse2Type<ipReal32>::Type& in2,
79  RegMaskType<eInstructionSet::eIS_Sse2, ipReal32>::Type& out)
80 {
81  out = _mm_cmpge_ps(in1, in2);
82 }
83 
85 IPSDK_FORCEINLINE
86 RegMaskType<eInstructionSet::eIS_Sse2, ipReal64>::Type
87 IsGreaterEqualReg<eInstructionSet::eIS_Sse2, ipReal64>::act(
88  const Sse2Type<ipReal64>::Type& in1,
89  const Sse2Type<ipReal64>::Type& in2)
90 {
91  return _mm_cmpge_pd(in1, in2);
92 }
93 
94 IPSDK_FORCEINLINE
95 void
96 IsGreaterEqualReg<eInstructionSet::eIS_Sse2, ipReal64>::act(
97  const Sse2Type<ipReal64>::Type& in1,
98  const Sse2Type<ipReal64>::Type& in2,
99  RegMaskType<eInstructionSet::eIS_Sse2, ipReal64>::Type& out)
100 {
101  out = _mm_cmpge_pd(in1, in2);
102 }
103 
106 
107 } // end of namespace detail
108 } // end of namespace simd
109 } // end of namespace ipsdk
110 
112 
113 #endif // __IPSDKUTIL_INSTRUCTIONSET_COMPARISON_DETAIL_SSE2_ISGREATEREQUALIMPL_H__
114 
declaration of specialized BitwiseAndReg structure for SSE2 instruction set
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Streaming SIMD Extensions 2.
Definition: InstructionSetTypes.h:36