IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
BitwiseXOrReg.h
Go to the documentation of this file.
1 // BitwiseXOrReg.h:
3 // -------------------
4 //
14 
15 #ifndef __IPSDKUTIL_INSTRUCTIONSET_LOGICAL_DETAIL_SSE2_BITWISEXORREG_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_LOGICAL_DETAIL_SSE2_BITWISEXORREG_H__
17 
20 
21 namespace ipsdk {
22 namespace simd {
23 namespace detail {
24 
27 
30 template <typename T>
32  typename boost::enable_if_c<boost::is_integral<T>::value>::type>
33 {
34  static IPSDK_FORCEINLINE
35  typename Sse2Type<T>::Type
36  act(const typename Sse2Type<T>::Type& in1,
37  const typename Sse2Type<T>::Type& in2)
38  {
39  return _mm_xor_si128(in1, in2);
40  }
41 
42  static IPSDK_FORCEINLINE
43  void
44  act(const typename Sse2Type<T>::Type& in1,
45  const typename Sse2Type<T>::Type& in2,
46  typename Sse2Type<T>::Type& out)
47  {
48  out = _mm_xor_si128(in1, in2);
49  }
50 };
51 
54 template <>
56 {
57  static IPSDK_FORCEINLINE
59  act(const Sse2Type<ipReal32>::Type& in1,
60  const Sse2Type<ipReal32>::Type& in2)
61  {
62  return _mm_xor_ps(in1, in2);
63  }
64 
65  static IPSDK_FORCEINLINE
66  void
67  act(const Sse2Type<ipReal32>::Type& in1,
68  const Sse2Type<ipReal32>::Type& in2,
70  {
71  out = _mm_xor_ps(in1, in2);
72  }
73 };
74 
77 
78 } // end of namespace detail
79 } // end of namespace simd
80 } // end of namespace ipsdk
81 
82 #endif // __IPSDKUTIL_INSTRUCTIONSET_LOGICAL_DETAIL_SSE2_BITWISEXORREG_H__
Defines the IPSDK_FORCEINLINE.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
eInstructionSet
Enumerate for processor instruction set description.
Definition: InstructionSetTypes.h:31
Definition: BitwiseXOrReg.h:30
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