74 __m256i odd = _mm256_permutevar8x32_epi32(regi, _mm256_setr_epi32(1, 0, 1, 2, 3, 4, 5, 6));
77 __m256i even = _mm256_sllv_epi64(regi, _mm256_setr_epi64x(6, 14, 22, 30));
78 odd = _mm256_srlv_epi64(odd, _mm256_setr_epi64x(30, 22, 14, 6));
81 __m256i both = _mm256_blend_epi32(even, odd, 0b01010101);
82 __m256i right = _mm256_and_si256(_mm256_set1_epi32(0xFFFFu), both);
83 __m256i left = _mm256_and_si256(_mm256_set1_epi32(0x3FFF0000u), both);
85 right = _mm256_srli_epi32(right, 2);
86 return _mm256_or_si256(left, right);
95 __m256i idx = _mm256_set_epi32(6, 5, 4, 3, 3, 2, 1, 0);
96 __m256i shuf1 = _mm256_permutevar8x32_epi32(regi, idx);
99 __m256i count = _mm256_set_epi32(12, 8, 4, 0, 14, 10, 6, 2);
100 __m256i high_half = _mm256_sllv_epi32(shuf1, count);
101 high_half = _mm256_and_si256(high_half, _mm256_set1_epi32(0x3FFF0000u));
104 count = _mm256_set_epi32(10, 6, 2, 0, 12, 8, 4, 0);
105 __m256i shift2 = _mm256_sllv_epi32(shuf1, count);
108 idx = _mm256_set_epi32(5, 4, 3, 2, 2, 1, 0, 0);
109 __m256i shuf2 = _mm256_permutevar8x32_epi32(regi, idx);
112 count = _mm256_set_epi32(22, 26, 30, 0, 20, 24, 28, 0);
113 __m256i shift3 = _mm256_srlv_epi32(shuf2, count);
116 __m256i low_half = _mm256_or_si256(shift2, shift3);
117 low_half = _mm256_and_si256(low_half, _mm256_set1_epi32(0x3FFFu));
120 __m256i both = _mm256_or_si256(low_half, high_half);
121 both = _mm256_andnot_si256(_mm256_set_epi32(0, 0, 0, 0xFFFFu, 0, 0, 0, 0), both);
125 __m256i shift4 = _mm256_srli_epi32(regi, 18);
127 shift4 = _mm256_and_si256(_mm256_set_epi32(0, 0x3FFFu, 0, 0, 0, 0, 0, 0), shift4);
130 idx = _mm256_set_epi32(0, 0, 0, 6, 0, 0, 0, 0);
131 __m256i shuf3 = _mm256_permutevar8x32_epi32(shift4, idx);
134 both = _mm256_or_si256(both, shuf3);
void configure(const std::vector< std::pair< std::string, nlohmann::json > > &configs, const std::vector< std::pair< dunedaq::trgdataformats::channel_t, int16_t > > channel_plane_numbers, const float sample_tick_difference)
Setup and configure the AVX pipelines.