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_AVX_SHIFTLEFTREG_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_LOGICAL_DETAIL_AVX_SHIFTLEFTREG_H__
17 
22 
25 
26 namespace ipsdk {
27 namespace simd {
28 namespace detail {
29 
32 
35 template <>
37 {
38  static IPSDK_FORCEINLINE
40  act(const AvxType<ipInt32>::Type& in,
41  ipUInt8 nbBits)
42  {
44  act(in, nbBits, out);
45  return out;
46  }
47 
48  static IPSDK_FORCEINLINE
49  void
50  act(const AvxType<ipInt32>::Type& in,
51  ipUInt8 nbBits,
53  {
54  __m128i in1, in2;
55  COPY_IMM_TO_XMM(in, in1, in2);
56  in1 = _mm_slli_epi32(in1, nbBits);
57  in2 = _mm_slli_epi32(in2, nbBits);
58  COPY_XMM_TO_IMM(in1, in2, out);
59  }
60 };
61 
62 } // end of namespace detail
63 } // end of namespace simd
64 } // end of namespace ipsdk
65 
66 #endif // __IPSDKUTIL_INSTRUCTIONSET_LOGICAL_DETAIL_AVX_SHIFTLEFTPACK_H__
Defines the IPSDK_FORCEINLINE.
Functions to convert from 128 (resp. 256) bits registers to 256 (resp. 128) bits registers.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
int32_t ipInt32
Base types definition.
Definition: BaseTypes.h:52
uint8_t ipUInt8
Base types definition.
Definition: BaseTypes.h:49
eInstructionSet
Enumerate for processor instruction set description.
Definition: InstructionSetTypes.h:31
Advanced Vector Extensions.
Definition: InstructionSetTypes.h:44
Definition: ShiftLeftReg.h:30
Definition of import/export macro for library.
structure used to retrieve AVX type associated to a base type
Definition: AvxTypes.h:33