Skip to content

Commit 7f6dc4f

Browse files
committed
Add missing bytes to sum function
1 parent 2a8a553 commit 7f6dc4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/Platform/x86/AVX2.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class AVX2Vector {
120120
sum128 = _mm_add_epi16(_mm_unpacklo_epi32(sum128, _mm_setzero_si128()), _mm_unpackhi_epi32(sum128, _mm_setzero_si128()));
121121

122122
// Extract the result as a 16-bit integer
123-
return static_cast<uint16_t>(_mm_extract_epi16(sum128, 0));
123+
return static_cast<uint16_t>(_mm_extract_epi16(sum128, 0) + _mm_extract_epi16(sum128, 4));
124124
}
125125
#endif
126126

0 commit comments

Comments
 (0)