IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
ShiftLeftReg.h
Go to the documentation of this file.
1 // ShiftLeftReg.h:
3 // -------------------
4 //
14 
15 #ifndef __IPSDKUTIL_INSTRUCTIONSET_LOGICAL_DETAIL_AVX512_SHIFTLEFTREG_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_LOGICAL_DETAIL_AVX512_SHIFTLEFTREG_H__
17 
21 
22 namespace ipsdk {
23 namespace simd {
24 namespace detail {
25 
28 
31 template <>
33 {
34  static IPSDK_FORCEINLINE
36  act(const Avx512Type<ipUInt16>::Type& in,
37  ipUInt8 nbBits)
38  {
39  return _mm512_slli_epi16(in, nbBits);
40  }
41 
42  static IPSDK_FORCEINLINE
43  void
44  act(const Avx512Type<ipUInt16>::Type& in,
45  ipUInt8 nbBits,
47  {
48  out = _mm512_slli_epi16(in, nbBits);
49  }
50 };
51 
54 template <>
56 {
57  static IPSDK_FORCEINLINE
59  act(const Avx512Type<ipInt16>::Type& in,
60  ipUInt8 nbBits)
61  {
62  return _mm512_slli_epi16(in, nbBits);
63  }
64 
65  static IPSDK_FORCEINLINE
66  void
67  act(const Avx512Type<ipInt16>::Type& in,
68  ipUInt8 nbBits,
70  {
71  out = _mm512_slli_epi16(in, nbBits);
72  }
73 };
74 
75 
76 
79 template <>
81 {
82  static IPSDK_FORCEINLINE
84  act(const Avx512Type<ipUInt32>::Type& in,
85  ipUInt8 nbBits)
86  {
87  return _mm512_slli_epi32(in, nbBits);
88  }
89 
90  static IPSDK_FORCEINLINE
91  void
92  act(const Avx512Type<ipUInt32>::Type& in,
93  ipUInt8 nbBits,
95  {
96  out = _mm512_slli_epi32(in, nbBits);
97  }
98 };
99 
102 template <>
104 {
105  static IPSDK_FORCEINLINE
107  act(const Avx512Type<ipInt32>::Type& in,
108  ipUInt8 nbBits)
109  {
110  return _mm512_slli_epi32(in, nbBits);
111  }
112 
113  static IPSDK_FORCEINLINE
114  void
115  act(const Avx512Type<ipInt32>::Type& in,
116  ipUInt8 nbBits,
118  {
119  out = _mm512_slli_epi32(in, nbBits);
120  }
121 };
122 
125 
126 } // end of namespace detail
127 } // end of namespace simd
128 } // end of namespace ipsdk
129 
130 #endif // __IPSDKUTIL_INSTRUCTIONSET_LOGICAL_DETAIL_AVX512_SHIFTLEFTPACK_H__
Defines the IPSDK_FORCEINLINE.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
int32_t ipInt32
Base types definition.
Definition: BaseTypes.h:52
(including fundation and byte and word instructions)
Definition: InstructionSetTypes.h:51
int16_t ipInt16
Base types definition.
Definition: BaseTypes.h:50
uint8_t ipUInt8
Base types definition.
Definition: BaseTypes.h:49
eInstructionSet
Enumerate for processor instruction set description.
Definition: InstructionSetTypes.h:31
Definition: ShiftLeftReg.h:30
Definition of import/export macro for library.
uint16_t ipUInt16
Base types definition.
Definition: BaseTypes.h:51
uint32_t ipUInt32
Base types definition.
Definition: BaseTypes.h:53
structure used to retrieve AVX512 type associated to a base type
Definition: Avx512Types.h:36