IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
BitwiseAndReg.h
Go to the documentation of this file.
1 // BitwiseAndReg.h:
3 // -------------------
4 //
14 
15 #ifndef __IPSDKUTIL_INSTRUCTIONSET_LOGICAL_DETAIL_AVX2_BITWISEANDREG_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_LOGICAL_DETAIL_AVX2_BITWISEANDREG_H__
17 
21 
22 namespace ipsdk {
23 namespace simd {
24 namespace detail {
25 
28 
29 template <typename T>
31  typename boost::enable_if_c<boost::is_integral<T>::value>::type>
32 {
33  static IPSDK_FORCEINLINE
34  typename AvxType<T>::Type
35  act(const typename AvxType<T>::Type& in1, const typename AvxType<T>::Type& in2)
36  {
37  return _mm256_and_si256(in1, in2);
38  }
39 
40  static IPSDK_FORCEINLINE
41  void
42  act(const typename AvxType<T>::Type& in1,
43  const typename AvxType<T>::Type& in2,
44  typename AvxType<T>::Type& out)
45  {
46  out = _mm256_and_si256(in1, in2);
47  }
48 };
49 
50 template <>
52 {
53  static IPSDK_FORCEINLINE
55  act(const AvxType<ipReal32>::Type& in1,
56  const AvxType<ipReal32>::Type& in2)
57  {
59  }
60 
61  static IPSDK_FORCEINLINE
62  void
63  act(const AvxType<ipReal32>::Type& in1,
64  const AvxType<ipReal32>::Type& in2,
66  {
68  }
69 };
70 
71 template <>
73 {
74  static IPSDK_FORCEINLINE
76  act(const AvxType<ipReal64>::Type& in1,
77  const AvxType<ipReal64>::Type& in2)
78  {
80  }
81 
82  static IPSDK_FORCEINLINE
83  void
84  act(const AvxType<ipReal64>::Type& in1,
85  const AvxType<ipReal64>::Type& in2,
87  {
89  }
90 };
91 
94 
95 } // end of namespace detail
96 } // end of namespace simd
97 } // end of namespace ipsdk
98 
99 #endif // __IPSDKUTIL_INSTRUCTIONSET_LOGICAL_DETAIL_AVX2_BITWISEANDREG_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
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
Definition: BitwiseAndReg.h:30
float ipReal32
Base types definition.
Definition: BaseTypes.h:56