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_AVX512_BITWISEANDREG_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_LOGICAL_DETAIL_AVX512_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 Avx512Type<T>::Type
35  act(const typename Avx512Type<T>::Type& in1, const typename Avx512Type<T>::Type& in2)
36  {
37  return _mm512_and_si512(in1, in2);
38  }
39 
40  static IPSDK_FORCEINLINE
41  void
42  act(const typename Avx512Type<T>::Type& in1,
43  const typename Avx512Type<T>::Type& in2,
44  typename Avx512Type<T>::Type& out)
45  {
46  out = _mm512_and_si512(in1, in2);
47  }
48 };
49 
50 template <>
52 {
53  static IPSDK_FORCEINLINE
55  act(const Avx512Type<ipReal32>::Type& in1,
56  const Avx512Type<ipReal32>::Type& in2)
57  {
58  return _mm512_and_ps(in1, in2);
59  }
60 
61  static IPSDK_FORCEINLINE
62  void
63  act(const Avx512Type<ipReal32>::Type& in1,
64  const Avx512Type<ipReal32>::Type& in2,
66  {
67  out = _mm512_and_ps(in1, in2);
68  }
69 };
70 
71 template <>
73 {
74  static IPSDK_FORCEINLINE
76  act(const Avx512Type<ipReal64>::Type& in1,
77  const Avx512Type<ipReal64>::Type& in2)
78  {
79  return _mm512_and_pd(in1, in2);
80  }
81 
82  static IPSDK_FORCEINLINE
83  void
84  act(const Avx512Type<ipReal64>::Type& in1,
85  const Avx512Type<ipReal64>::Type& in2,
87  {
88  out = _mm512_and_pd(in1, in2);
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_AVX512_BITWISEANDREG_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 of import/export macro for library.
Definition: BitwiseAndReg.h:30
float ipReal32
Base types definition.
Definition: BaseTypes.h:56
structure used to retrieve AVX512 type associated to a base type
Definition: Avx512Types.h:36