190 const uint8_t BSWAP_MASK[64] = {
191 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12, 19, 18, 17, 16, 23, 22,
192 21, 20, 27, 26, 25, 24, 31, 30, 29, 28, 35, 34, 33, 32, 39, 38, 37, 36, 43, 42, 41, 40,
193 47, 46, 45, 44, 51, 50, 49, 48, 55, 54, 53, 52, 59, 58, 57, 56, 63, 62, 61, 60,
196 const __m512i
bswap = _mm512_loadu_si512(
reinterpret_cast<const __m512i*
>(BSWAP_MASK));
198 const __m512i output = _mm512_shuffle_epi8(m_avx512,
bswap);
236 auto t0 = _mm512_unpacklo_epi32(B0.
raw(), B1.
raw());
237 auto t1 = _mm512_unpackhi_epi32(B0.
raw(), B1.
raw());
238 auto t2 = _mm512_unpacklo_epi32(B2.
raw(), B3.
raw());
239 auto t3 = _mm512_unpackhi_epi32(B2.
raw(), B3.
raw());
240 auto t4 = _mm512_unpacklo_epi32(B4.
raw(), B5.
raw());
241 auto t5 = _mm512_unpackhi_epi32(B4.
raw(), B5.
raw());
242 auto t6 = _mm512_unpacklo_epi32(B6.
raw(), B7.
raw());
243 auto t7 = _mm512_unpackhi_epi32(B6.
raw(), B7.
raw());
244 auto t8 = _mm512_unpacklo_epi32(B8.
raw(), B9.
raw());
245 auto t9 = _mm512_unpackhi_epi32(B8.
raw(), B9.
raw());
246 auto ta = _mm512_unpacklo_epi32(BA.
raw(), BB.
raw());
247 auto tb = _mm512_unpackhi_epi32(BA.
raw(), BB.
raw());
248 auto tc = _mm512_unpacklo_epi32(BC.
raw(), BD.
raw());
249 auto td = _mm512_unpackhi_epi32(BC.
raw(), BD.
raw());
250 auto te = _mm512_unpacklo_epi32(BE.
raw(), BF.
raw());
251 auto tf = _mm512_unpackhi_epi32(BE.
raw(), BF.
raw());
253 const auto r0 = _mm512_unpacklo_epi64(t0, t2);
254 const auto r1 = _mm512_unpackhi_epi64(t0, t2);
255 const auto r2 = _mm512_unpacklo_epi64(t1, t3);
256 const auto r3 = _mm512_unpackhi_epi64(t1, t3);
257 const auto r4 = _mm512_unpacklo_epi64(t4, t6);
258 const auto r5 = _mm512_unpackhi_epi64(t4, t6);
259 const auto r6 = _mm512_unpacklo_epi64(t5, t7);
260 const auto r7 = _mm512_unpackhi_epi64(t5, t7);
261 const auto r8 = _mm512_unpacklo_epi64(t8, ta);
262 const auto r9 = _mm512_unpackhi_epi64(t8, ta);
263 const auto ra = _mm512_unpacklo_epi64(t9, tb);
264 const auto rb = _mm512_unpackhi_epi64(t9, tb);
265 const auto rc = _mm512_unpacklo_epi64(tc, te);
266 const auto rd = _mm512_unpackhi_epi64(tc, te);
267 const auto re = _mm512_unpacklo_epi64(td, tf);
268 const auto rf = _mm512_unpackhi_epi64(td, tf);
270 t0 = _mm512_shuffle_i32x4(r0, r4, 0x88);
271 t1 = _mm512_shuffle_i32x4(r1, r5, 0x88);
272 t2 = _mm512_shuffle_i32x4(r2, r6, 0x88);
273 t3 = _mm512_shuffle_i32x4(r3, r7, 0x88);
274 t4 = _mm512_shuffle_i32x4(r0, r4, 0xdd);
275 t5 = _mm512_shuffle_i32x4(r1, r5, 0xdd);
276 t6 = _mm512_shuffle_i32x4(r2, r6, 0xdd);
277 t7 = _mm512_shuffle_i32x4(r3, r7, 0xdd);
278 t8 = _mm512_shuffle_i32x4(r8, rc, 0x88);
279 t9 = _mm512_shuffle_i32x4(r9, rd, 0x88);
280 ta = _mm512_shuffle_i32x4(ra, re, 0x88);
281 tb = _mm512_shuffle_i32x4(rb, rf, 0x88);
282 tc = _mm512_shuffle_i32x4(r8, rc, 0xdd);
283 td = _mm512_shuffle_i32x4(r9, rd, 0xdd);
284 te = _mm512_shuffle_i32x4(ra, re, 0xdd);
285 tf = _mm512_shuffle_i32x4(rb, rf, 0xdd);
287 B0.m_avx512 = _mm512_shuffle_i32x4(t0, t8, 0x88);
288 B1.m_avx512 = _mm512_shuffle_i32x4(t1, t9, 0x88);
289 B2.m_avx512 = _mm512_shuffle_i32x4(t2, ta, 0x88);
290 B3.m_avx512 = _mm512_shuffle_i32x4(t3, tb, 0x88);
291 B4.m_avx512 = _mm512_shuffle_i32x4(t4, tc, 0x88);
292 B5.m_avx512 = _mm512_shuffle_i32x4(t5, td, 0x88);
293 B6.m_avx512 = _mm512_shuffle_i32x4(t6, te, 0x88);
294 B7.m_avx512 = _mm512_shuffle_i32x4(t7, tf, 0x88);
295 B8.m_avx512 = _mm512_shuffle_i32x4(t0, t8, 0xdd);
296 B9.m_avx512 = _mm512_shuffle_i32x4(t1, t9, 0xdd);
297 BA.m_avx512 = _mm512_shuffle_i32x4(t2, ta, 0xdd);
298 BB.m_avx512 = _mm512_shuffle_i32x4(t3, tb, 0xdd);
299 BC.m_avx512 = _mm512_shuffle_i32x4(t4, tc, 0xdd);
300 BD.m_avx512 = _mm512_shuffle_i32x4(t5, td, 0xdd);
301 BE.m_avx512 = _mm512_shuffle_i32x4(t6, te, 0xdd);
302 BF.m_avx512 = _mm512_shuffle_i32x4(t7, tf, 0xdd);