IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
BitwiseOrReg.h
Go to the documentation of this file.
1 // BitwiseOrReg.h:
3 // -------------------
4 //
14 
15 #ifndef __IPSDKUTIL_INSTRUCTIONSET_LOGICAL_DETAIL_AVX2_BITWISEORREG_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_LOGICAL_DETAIL_AVX2_BITWISEORREG_H__
17 
23 
24 namespace ipsdk {
25 namespace simd {
26 namespace detail {
27 
30 
31 template <typename T>
33  typename boost::enable_if_c<boost::is_integral<T>::value>::type>
34 {
35  static IPSDK_FORCEINLINE
36  typename AvxType<T>::Type
37  act(const typename AvxType<T>::Type& in1,
38  const typename AvxType<T>::Type& in2)
39  {
40  return _mm256_or_si256(in1, in2);
41  }
42 
43  static IPSDK_FORCEINLINE
44  void
45  act(const typename AvxType<T>::Type& in1,
46  const typename AvxType<T>::Type& in2,
47  typename AvxType<T>::Type& out)
48  {
49  out = _mm256_or_si256(in1, in2);
50  }
51 };
52 
53 template <>
55 {
56  static IPSDK_FORCEINLINE
58  act(const AvxType<ipReal32>::Type& in1,
59  const AvxType<ipReal32>::Type& in2)
60  {
62  }
63 
64  static IPSDK_FORCEINLINE
65  void
66  act(const AvxType<ipReal32>::Type& in1,
67  const AvxType<ipReal32>::Type& in2,
69  {
71  }
72 };
73 
74 template <>
76 {
77  static IPSDK_FORCEINLINE
79  act(const AvxType<ipReal64>::Type& in1,
80  const AvxType<ipReal64>::Type& in2)
81  {
83  }
84 
85  static IPSDK_FORCEINLINE
86  void
87  act(const AvxType<ipReal64>::Type& in1,
88  const AvxType<ipReal64>::Type& in2,
90  {
92  }
93 };
94 
97 
98 } // end of namespace detail
99 } // end of namespace simd
100 } // end of namespace ipsdk
101 
102 #endif // __IPSDKUTIL_INSTRUCTIONSET_LOGICAL_DETAIL_AVX2_BITWISEORREG_H__
Defines the IPSDK_FORCEINLINE.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
double ipReal64
Base types definition.
Definition: BaseTypes.h:57
Predefined types for Avx instruction set management.
eInstructionSet
Enumerate for processor instruction set description.
Definition: InstructionSetTypes.h:31
Definition: BitwiseOrReg.h:30
Advanced Vector Extensions 2.
Definition: InstructionSetTypes.h:48
Definition of import/export macro for library.
structure used to retrieve AVX type associated to a base type
Definition: AvxTypes.h:33
float ipReal32
Base types definition.
Definition: BaseTypes.h:56