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_SSE2_SHIFTLEFTREG_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_LOGICAL_DETAIL_SSE2_SHIFTLEFTREG_H__
17 
22 
23 namespace ipsdk {
24 namespace simd {
25 namespace detail {
26 
29 
32 template <>
34 {
35  static IPSDK_FORCEINLINE
37  act(const Sse2Type<ipUInt16>::Type& in,
38  ipUInt8 nbBits)
39  {
40  return _mm_slli_epi16(in, nbBits);
41  }
42 
43  static IPSDK_FORCEINLINE
44  void
45  act(const Sse2Type<ipUInt16>::Type& in,
46  ipUInt8 nbBits,
48  {
49  out = _mm_slli_epi16(in, nbBits);
50  }
51 };
52 
55 template <>
57 {
58  static IPSDK_FORCEINLINE
60  act(const Sse2Type<ipInt16>::Type& in,
61  ipUInt8 nbBits)
62  {
63  return _mm_slli_epi16(in, nbBits);
64  }
65 
66  static IPSDK_FORCEINLINE
67  void
68  act(const Sse2Type<ipInt16>::Type& in,
69  ipUInt8 nbBits,
71  {
72  out = _mm_slli_epi16(in, nbBits);
73  }
74 };
75 
78 template <>
80 {
81  static IPSDK_FORCEINLINE
83  act(const Sse2Type<ipUInt32>::Type& in,
84  ipUInt8 nbBits)
85  {
86  return _mm_slli_epi32(in, nbBits);
87  }
88 
89  static IPSDK_FORCEINLINE
90  void
91  act(const Sse2Type<ipUInt32>::Type& in,
92  ipUInt8 nbBits,
94  {
95  out = _mm_slli_epi32(in, nbBits);
96  }
97 };
98 
101 template <>
103 {
104  static IPSDK_FORCEINLINE
106  act(const Sse2Type<ipInt32>::Type& in,
107  ipUInt8 nbBits)
108  {
109  return _mm_slli_epi32(in, nbBits);
110  }
111 
112  static IPSDK_FORCEINLINE
113  void
114  act(const Sse2Type<ipInt32>::Type& in,
115  ipUInt8 nbBits,
117  {
118  out = _mm_slli_epi32(in, nbBits);
119  }
120 };
121 
124 
125 } // end of namespace detail
126 } // end of namespace simd
127 } // end of namespace ipsdk
128 
129 #endif // __IPSDKUTIL_INSTRUCTIONSET_LOGICAL_DETAIL_SSE2_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
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.
Streaming SIMD Extensions 2.
Definition: InstructionSetTypes.h:36
structure used to retrieve SSE2 type associated to a base type
Definition: Sse2Types.h:32
uint16_t ipUInt16
Base types definition.
Definition: BaseTypes.h:51
uint32_t ipUInt32
Base types definition.
Definition: BaseTypes.h:53