IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
BitwiseAndNotReg.h
Go to the documentation of this file.
1 // BitwiseAndNotReg.h:
3 // -------------------
4 //
14 
15 #ifndef __IPSDKUTIL_INSTRUCTIONSET_LOGICAL_DETAIL_SSE2_BITWISEANDNOTREG_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_LOGICAL_DETAIL_SSE2_BITWISEANDNOTREG_H__
17 
21 
22 namespace ipsdk {
23 namespace simd {
24 namespace detail {
25 
28 
31 template <typename T>
33  typename boost::enable_if_c<boost::is_integral<T>::value>::type>
34 {
35  static IPSDK_FORCEINLINE
36  typename Sse2Type<T>::Type
37  act(const typename Sse2Type<T>::Type& in1,
38  const typename Sse2Type<T>::Type& in2)
39  {
40  return _mm_andnot_si128(in2, in1);
41  }
42 
43  static IPSDK_FORCEINLINE
44  void
45  act(const typename Sse2Type<T>::Type& in1,
46  const typename Sse2Type<T>::Type& in2,
47  typename Sse2Type<T>::Type& out)
48  {
49  out = _mm_andnot_si128(in2, in1);
50  }
51 };
52 
55 template <>
57 {
58  static IPSDK_FORCEINLINE
60  act(const Sse2Type<ipReal32>::Type& in1,
61  const Sse2Type<ipReal32>::Type& in2)
62  {
63  return _mm_andnot_ps(in2, in1);
64  }
65 
66  static IPSDK_FORCEINLINE
67  void
68  act(const Sse2Type<ipReal32>::Type& in1,
69  const Sse2Type<ipReal32>::Type& in2,
71  {
72  out = _mm_andnot_ps(in2, in1);
73  }
74 };
75 
78 template <>
80 {
81  static IPSDK_FORCEINLINE
83  act(const Sse2Type<ipReal64>::Type& in1,
84  const Sse2Type<ipReal64>::Type& in2)
85  {
86  return _mm_andnot_pd(in2, in1);
87  }
88 
89  static IPSDK_FORCEINLINE
90  void
91  act(const Sse2Type<ipReal64>::Type& in1,
92  const Sse2Type<ipReal64>::Type& in2,
94  {
95  out = _mm_andnot_pd(in2, in1);
96  }
97 };
98 
101 
102 } // end of namespace detail
103 } // end of namespace simd
104 } // end of namespace ipsdk
105 
106 #endif // __IPSDKUTIL_INSTRUCTIONSET_LOGICAL_DETAIL_SSE2_BITWISEANDNOTREG_H__
Defines the IPSDK_FORCEINLINE.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Definition: BitwiseAndNotReg.h:30
double ipReal64
Base types definition.
Definition: BaseTypes.h:57
eInstructionSet
Enumerate for processor instruction set description.
Definition: InstructionSetTypes.h:31
Predefined types for Sse2 instruction set management.
Definition of import/export macro for library.
Streaming SIMD Extensions 2.
Definition: InstructionSetTypes.h:36
structure used to retrieve SSE2 type associated to a base type
Definition: Sse2Types.h:32
float ipReal32
Base types definition.
Definition: BaseTypes.h:56