Skip to content

Commit b6bfb20

Browse files
committed
Improve readability of conditional code
Signed-off-by: Stefan Weil <[email protected]>
1 parent 36a1a30 commit b6bfb20

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/arch/intsimdmatrixavx2.cpp

+4-6
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,13 @@ static inline void ExtractResults(__m256i& result, __m256i& shift_id,
8585
const int8_t*& wi, const double*& scales,
8686
int num_out, double*& v) {
8787
for (int out = 0; out < num_out; ++out) {
88-
auto res =
8988
#ifndef _MSC_VER
90-
_mm256_extract_epi32(result, 0)
89+
auto res = _mm256_extract_epi32(result, 0);
9190
#else
92-
// Workaround MSVC's ICE
93-
// _mm256_extract_epi32(X, Y) == ((int32_t*)&X)[Y]
94-
((int32_t*)&result)[0]
91+
// Workaround MSVC's ICE
92+
// _mm256_extract_epi32(X, Y) == ((int32_t*)&X)[Y]
93+
auto res = ((int32_t*)&result)[0];
9594
#endif
96-
;
9795
*v++ = (static_cast<double>(res) / INT8_MAX + *wi++) * *scales++;
9896
// Rotate the results in int32_t units, so the next result is ready.
9997
result = _mm256_permutevar8x32_epi32(result, shift_id);

0 commit comments

Comments
 (0)