15 #ifndef __IPSDKUTIL_INSTRUCTIONSET_DETAIL_AVX2_SCATTERPACKIMPL_H__ 16 #define __IPSDKUTIL_INSTRUCTIONSET_DETAIL_AVX2_SCATTERPACKIMPL_H__ 35 typename boost::enable_if_c<sizeof(T) == 1>::type
37 const BasePack<ePackType::ePT_Avx, T>& in,
41 ScatterReg<eInstructionSet::eIS_Avx2, T>::act(
51 typename boost::enable_if_c<sizeof(T) == 1>::type
53 const BasePack<ePackType::ePT_Avx, T>& in,
54 const BasePack<ePackType::ePT_Avx, ipUInt32>& packIdx,
57 ScatterReg<eInstructionSet::eIS_Avx2, T>::act(
59 packIdx._val[0], packIdx._val[1],
60 packIdx._val[2], packIdx._val[3],
68 typename boost::enable_if_c<sizeof(T) == 2>::type
70 const BasePack<ePackType::ePT_Avx, T>& in,
74 ScatterReg<eInstructionSet::eIS_Avx2, T>::act(
75 in._val[0], indexes, outBaseAddr);
76 ScatterReg<eInstructionSet::eIS_Avx2, T>::act(
77 in._val[1], indexes+16, outBaseAddr);
84 typename boost::enable_if_c<sizeof(T) == 2>::type
86 const BasePack<ePackType::ePT_Avx, T>& in,
87 const BasePack<ePackType::ePT_Avx, ipUInt32>& packIdx,
90 ScatterReg<eInstructionSet::eIS_Avx2, T>::act(
91 in._val[0], packIdx._val[0], packIdx._val[1], outBaseAddr);
92 ScatterReg<eInstructionSet::eIS_Avx2, T>::act(
93 in._val[1], packIdx._val[2], packIdx._val[3], outBaseAddr);
100 typename boost::enable_if_c<sizeof(T) == 4>::type
102 const BasePack<ePackType::ePT_Avx, T>& in,
104 T*
const outBaseAddr)
106 ScatterReg<eInstructionSet::eIS_Avx2, T>::act(
107 in._val[0], indexes, outBaseAddr);
108 ScatterReg<eInstructionSet::eIS_Avx2, T>::act(
109 in._val[1], indexes+8, outBaseAddr);
110 ScatterReg<eInstructionSet::eIS_Avx2, T>::act(
111 in._val[2], indexes+16, outBaseAddr);
112 ScatterReg<eInstructionSet::eIS_Avx2, T>::act(
113 in._val[3], indexes+24, outBaseAddr);
116 template <
typename T>
120 typename boost::enable_if_c<sizeof(T) == 4>::type
122 const BasePack<ePackType::ePT_Avx, T>& in,
123 const BasePack<ePackType::ePT_Avx, ipUInt32>& packIdx,
124 T*
const outBaseAddr)
126 ScatterReg<eInstructionSet::eIS_Avx2, T>::act(
127 in._val[0], packIdx._val[0], outBaseAddr);
128 ScatterReg<eInstructionSet::eIS_Avx2, T>::act(
129 in._val[1], packIdx._val[1], outBaseAddr);
130 ScatterReg<eInstructionSet::eIS_Avx2, T>::act(
131 in._val[2], packIdx._val[2], outBaseAddr);
132 ScatterReg<eInstructionSet::eIS_Avx2, T>::act(
133 in._val[3], packIdx._val[3], outBaseAddr);
136 template <
typename T>
140 typename boost::enable_if_c<sizeof(T) == 8>::type
142 const BasePack<ePackType::ePT_Avx, T>& in,
144 T*
const outBaseAddr)
146 ScatterReg<eInstructionSet::eIS_Avx2, T>::act(
147 in._val[0], indexes, outBaseAddr);
148 ScatterReg<eInstructionSet::eIS_Avx2, T>::act(
149 in._val[1], indexes+4, outBaseAddr);
150 ScatterReg<eInstructionSet::eIS_Avx2, T>::act(
151 in._val[2], indexes+8, outBaseAddr);
152 ScatterReg<eInstructionSet::eIS_Avx2, T>::act(
153 in._val[3], indexes+12, outBaseAddr);
154 ScatterReg<eInstructionSet::eIS_Avx2, T>::act(
155 in._val[4], indexes+16, outBaseAddr);
156 ScatterReg<eInstructionSet::eIS_Avx2, T>::act(
157 in._val[5], indexes+20, outBaseAddr);
158 ScatterReg<eInstructionSet::eIS_Avx2, T>::act(
159 in._val[6], indexes+24, outBaseAddr);
160 ScatterReg<eInstructionSet::eIS_Avx2, T>::act(
161 in._val[7], indexes+28, outBaseAddr);
164 template <
typename T>
168 typename boost::enable_if_c<sizeof(T) == 8>::type
170 const BasePack<ePackType::ePT_Avx, T>& in,
171 const BasePack<ePackType::ePT_Avx, ipUInt32>& packIdx,
172 T*
const outBaseAddr)
175 UnloadPack<eInstructionSet::eIS_Avx2, ipUInt32>::act(packIdx, indexes);
177 ScatterReg<eInstructionSet::eIS_Avx2, T>::act(
178 in._val[0], indexes, outBaseAddr);
179 ScatterReg<eInstructionSet::eIS_Avx2, T>::act(
180 in._val[1], indexes+4, outBaseAddr);
181 ScatterReg<eInstructionSet::eIS_Avx2, T>::act(
182 in._val[2], indexes+8, outBaseAddr);
183 ScatterReg<eInstructionSet::eIS_Avx2, T>::act(
184 in._val[3], indexes+12, outBaseAddr);
185 ScatterReg<eInstructionSet::eIS_Avx2, T>::act(
186 in._val[4], indexes+16, outBaseAddr);
187 ScatterReg<eInstructionSet::eIS_Avx2, T>::act(
188 in._val[5], indexes+20, outBaseAddr);
189 ScatterReg<eInstructionSet::eIS_Avx2, T>::act(
190 in._val[6], indexes+24, outBaseAddr);
191 ScatterReg<eInstructionSet::eIS_Avx2, T>::act(
192 in._val[7], indexes+28, outBaseAddr);
202 #endif // __IPSDKUTIL_INSTRUCTIONSET_SCATTER_DETAIL_AVX2_SCATTERPACKIMPL_H__ Defines the IPSDK_FORCEINLINE.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Advanced Vector Extensions 2.
Definition: InstructionSetTypes.h:48
Definition of import/export macro for library.
uint32_t ipUInt32
Base types definition.
Definition: BaseTypes.h:53