IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
ShiftRightReg.h
Go to the documentation of this file.
1 // ShiftRightReg.h:
3 // -------------------
4 //
14 
15 #ifndef __IPSDKUTIL_INSTRUCTIONSET_LOGICAL_DETAIL_AVX_SHIFTRIGHTREG_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_LOGICAL_DETAIL_AVX_SHIFTRIGHTREG_H__
17 
22 
25 
26 namespace ipsdk {
27 namespace simd {
28 namespace detail {
29 
32 template <>
34 {
35  static IPSDK_FORCEINLINE
37  act(const AvxType<ipInt32>::Type& in,
38  ipUInt8 nbBits)
39  {
41  act(in, nbBits, out);
42  return out;
43  }
44 
45  static IPSDK_FORCEINLINE
46  void
47  act(const AvxType<ipInt32>::Type& in,
48  ipUInt8 nbBits,
50  {
51  __m128i in1, in2;
52  COPY_IMM_TO_XMM(in, in1, in2);
53  in1 = _mm_srai_epi32(in1, nbBits);
54  in2 = _mm_srai_epi32(in2, nbBits);
55  COPY_XMM_TO_IMM(in1, in2, out);
56  }
57 };
58 
61 
62 } // end of namespace detail
63 } // end of namespace simd
64 } // end of namespace ipsdk
65 
66 #endif // __IPSDKUTIL_INSTRUCTIONSET_LOGICAL_DETAIL_AVX_SHIFTRIGHTPACK_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 of import/export macro for library.
Definition: ShiftRightReg.h:30
structure used to retrieve AVX type associated to a base type
Definition: AvxTypes.h:33