IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
GatherPackImpl.h
Go to the documentation of this file.
1 // GatherPackImpl.h:
3 // ------------
4 //
14 
15 #ifndef __IPSDKUTIL_INSTRUCTIONSET_DETAIL_AVX_GATHERPACKIMPL_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_DETAIL_AVX_GATHERPACKIMPL_H__
17 
23 
24 namespace ipsdk {
25 namespace simd {
26 namespace detail {
27 
30 
31 IPSDK_FORCEINLINE
32 void
33 GatherPack<eInstructionSet::eIS_Avx, ipReal32>::act(
34  const ipReal32* baseAddress,
35  const ipUInt32* indexes,
36  BasePack<ePackType::ePT_Avx, ipReal32>& out)
37 {
38  GatherReg<eInstructionSet::eIS_Avx, ipReal32>::act(
39  baseAddress, indexes, out._val[0]);
40  GatherReg<eInstructionSet::eIS_Avx, ipReal32>::act(
41  baseAddress, indexes+4, out._val[1]);
42  GatherReg<eInstructionSet::eIS_Avx, ipReal32>::act(
43  baseAddress, indexes+8, out._val[2]);
44  GatherReg<eInstructionSet::eIS_Avx, ipReal32>::act(
45  baseAddress, indexes+12, out._val[3]);
46 }
47 
48 IPSDK_FORCEINLINE
49 void
50 GatherPack<eInstructionSet::eIS_Avx, ipReal32>::act(
51  const ipReal32* baseAddress,
52  const BasePack<ePackType::ePT_Avx, ipUInt32>& packIdx,
53  BasePack<ePackType::ePT_Avx, ipReal32>& out)
54 {
55  GatherReg<eInstructionSet::eIS_Avx, ipReal32>::act(
56  baseAddress, packIdx._val[0], out._val[0]);
57  GatherReg<eInstructionSet::eIS_Avx, ipReal32>::act(
58  baseAddress, packIdx._val[1], out._val[1]);
59  GatherReg<eInstructionSet::eIS_Avx, ipReal32>::act(
60  baseAddress, packIdx._val[2], out._val[2]);
61  GatherReg<eInstructionSet::eIS_Avx, ipReal32>::act(
62  baseAddress, packIdx._val[3], out._val[3]);
63 }
64 
67 
68 } // end of namespace detail
69 } // end of namespace simd
70 } // end of namespace ipsdk
71 
72 #endif // __IPSDKUTIL_INSTRUCTIONSET_GATHER_DETAIL_AVX_GATHERPACKIMPL_H__
Defines the IPSDK_FORCEINLINE.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Definition of import/export macro for library.
float ipReal32
Base types definition.
Definition: BaseTypes.h:56
uint32_t ipUInt32
Base types definition.
Definition: BaseTypes.h:53