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_AVX512_BITWISEXORREG_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_LOGICAL_DETAIL_AVX512_BITWISEXORREG_H__
17 
22 
23 namespace ipsdk {
24 namespace simd {
25 namespace detail {
26 
29 
30 template <typename T>
32  typename boost::enable_if_c<boost::is_integral<T>::value>::type>
33 {
34  static IPSDK_FORCEINLINE
35  typename Avx512Type<T>::Type
36  act(const typename Avx512Type<T>::Type& in1,
37  const typename Avx512Type<T>::Type& in2)
38  {
39  return _mm512_xor_si512(in1, in2);
40  }
41 
42  static IPSDK_FORCEINLINE
43  void
44  act(const typename Avx512Type<T>::Type& in1,
45  const typename Avx512Type<T>::Type& in2,
46  typename Avx512Type<T>::Type& out)
47  {
48  out = _mm512_xor_si512(in1, in2);
49  }
50 };
51 
52 template <>
54 {
55  static IPSDK_FORCEINLINE
57  act(const Avx512Type<ipReal32>::Type& in1,
58  const Avx512Type<ipReal32>::Type& in2)
59  {
60  return _mm512_xor_ps(in1, in2);
61  }
62 
63  static IPSDK_FORCEINLINE
64  void
65  act(const Avx512Type<ipReal32>::Type& in1,
66  const Avx512Type<ipReal32>::Type& in2,
68  {
69  out = _mm512_xor_ps(in1, in2);
70  }
71 };
72 
73 template <>
75 {
76  static IPSDK_FORCEINLINE
78  act(const Avx512Type<ipReal64>::Type& in1,
79  const Avx512Type<ipReal64>::Type& in2)
80  {
81  return _mm512_xor_pd(in1, in2);
82  }
83 
84  static IPSDK_FORCEINLINE
85  void
86  act(const Avx512Type<ipReal64>::Type& in1,
87  const Avx512Type<ipReal64>::Type& in2,
89  {
90  out = _mm512_xor_pd(in1, in2);
91  }
92 };
93 
96 
97 } // end of namespace detail
98 } // end of namespace simd
99 } // end of namespace ipsdk
100 
101 #endif // __IPSDKUTIL_INSTRUCTIONSET_LOGICAL_DETAIL_AVX512_BITWISEXORREG_H__
Defines the IPSDK_FORCEINLINE.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
double ipReal64
Base types definition.
Definition: BaseTypes.h:57
(including fundation and byte and word instructions)
Definition: InstructionSetTypes.h:51
eInstructionSet
Enumerate for processor instruction set description.
Definition: InstructionSetTypes.h:31
Predefined types for Avx512 instruction set management.
Definition: BitwiseXOrReg.h:30
Definition of import/export macro for library.
float ipReal32
Base types definition.
Definition: BaseTypes.h:56
structure used to retrieve AVX512 type associated to a base type
Definition: Avx512Types.h:36