IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
IsNotEqualRegImpl.h
Go to the documentation of this file.
1 // IsNotEqualRegImpl.h:
3 // -------------------
4 //
10 
15 
16 #ifndef __IPSDKUTIL_INSTRUCTIONSET_COMPARISON_DETAIL_AVX2_ISNOTEQUALREGIMPL_H__
17 #define __IPSDKUTIL_INSTRUCTIONSET_COMPARISON_DETAIL_AVX2_ISNOTEQUALREGIMPL_H__
18 
22 
23 namespace ipsdk {
24 namespace simd {
25 namespace detail {
26 
29 
30 template <typename T>
31 IPSDK_FORCEINLINE
32 typename RegMaskType<eInstructionSet::eIS_Avx2, T>::Type
33 IsNotEqualReg<eInstructionSet::eIS_Avx2, T,
34  typename boost::enable_if_c<
35  boost::is_integral<T>::value
36  >::type
37 >::act(
38  const typename AvxType<T>::Type& in1,
39  const typename AvxType<T>::Type& in2)
40 {
41  return BitwiseNotReg<eInstructionSet::eIS_Avx2, T>::act(
42  IsEqualReg<eInstructionSet::eIS_Avx2, T>::act(in1, in2));
43 }
44 
45 template <typename T>
46 IPSDK_FORCEINLINE
47 void
48 IsNotEqualReg<eInstructionSet::eIS_Avx2, T,
49  typename boost::enable_if_c<
50  boost::is_integral<T>::value
51  >::type
52 >::act(
53  const typename AvxType<T>::Type& in1,
54  const typename AvxType<T>::Type& in2,
55  typename RegMaskType<eInstructionSet::eIS_Avx2, T>::Type& out)
56 {
57  IsEqualReg<eInstructionSet::eIS_Avx2, T>::act(in1, in2, out);
58  BitwiseNotReg<eInstructionSet::eIS_Avx2, T>::act(out, out);
59 }
60 
61 IPSDK_FORCEINLINE
62 RegMaskType<eInstructionSet::eIS_Avx2, ipReal32>::Type
63 IsNotEqualReg<eInstructionSet::eIS_Avx2, ipReal32>::act(
64  const AvxType<ipReal32>::Type& in1,
65  const AvxType<ipReal32>::Type& in2)
66 {
67  return IsNotEqualReg<eInstructionSet::eIS_Avx, ipReal32>::act(in1, in2);
68 }
69 
70 IPSDK_FORCEINLINE
71 void
72 IsNotEqualReg<eInstructionSet::eIS_Avx2, ipReal32>::act(
73  const AvxType<ipReal32>::Type& in1,
74  const AvxType<ipReal32>::Type& in2,
75  RegMaskType<eInstructionSet::eIS_Avx2, ipReal32>::Type& out)
76 {
77  IsNotEqualReg<eInstructionSet::eIS_Avx, ipReal32>::act(in1, in2, out);
78 }
79 
80 IPSDK_FORCEINLINE
81 RegMaskType<eInstructionSet::eIS_Avx2, ipReal64>::Type
82 IsNotEqualReg<eInstructionSet::eIS_Avx2, ipReal64>::act(
83  const AvxType<ipReal64>::Type& in1,
84  const AvxType<ipReal64>::Type& in2)
85 {
86  return IsNotEqualReg<eInstructionSet::eIS_Avx, ipReal64>::act(in1, in2);
87 }
88 
89 IPSDK_FORCEINLINE
90 void
91 IsNotEqualReg<eInstructionSet::eIS_Avx2, ipReal64>::act(
92  const AvxType<ipReal64>::Type& in1,
93  const AvxType<ipReal64>::Type& in2,
94  RegMaskType<eInstructionSet::eIS_Avx2, ipReal64>::Type& out)
95 {
96  IsNotEqualReg<eInstructionSet::eIS_Avx, ipReal64>::act(in1, in2, out);
97 }
98 
101 
102 } // end of namespace detail
103 } // end of namespace simd
104 } // end of namespace ipsdk
105 
107 
108 #endif // __IPSDKUTIL_INSTRUCTIONSET_COMPARISON_DETAIL_AVX2_ISNOTEQUALREGIMPL_H__
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Advanced Vector Extensions 2.
Definition: InstructionSetTypes.h:48
isEqual function