From eae433ad43975465458c63c5abb8b7d79c14270a Mon Sep 17 00:00:00 2001 From: RealTimeChris <40668522+RealTimeChris@users.noreply.github.com> Date: Fri, 22 Sep 2023 09:07:01 -0400 Subject: [PATCH 1/2] Fix: Fixing the AVX2 detection instruction. --- cmake/DetectArchitecture.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/DetectArchitecture.cmake b/cmake/DetectArchitecture.cmake index 1815324630..4c3a2030b5 100644 --- a/cmake/DetectArchitecture.cmake +++ b/cmake/DetectArchitecture.cmake @@ -25,13 +25,13 @@ endfunction() if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") set(INSTRUCTION_SETS "AVX1?/arch:AVX?__m128i value{}#auto result = _mm_extract_epi32(value, 0)" - "AVX2?/arch:AVX2?__m256i value{}#auto result = _mm256_extract_epi32(value, 0)" + "AVX2?/arch:AVX2?__m256i value{}#auto result = _mm256_add_epi32(__m256i{}, __m256i{})" "AVX512?/arch:AVX512?int32_t result[16]#const _mm512i& value{}#_mm512_store_si512(result, value)" ) else() set(INSTRUCTION_SETS "AVX1?-mavx?__m128i value{}#auto result = _mm_extract_epi32(value, 0)" - "AVX2?-mavx2?__m256i value{}#auto result = _mm256_extract_epi32(value, 0)" + "AVX2?-mavx2?__m256i value{}#auto result = _mm256_add_epi32(__m256i{}, __m256i{})" "AVX512?-mavx512f?int32_t result[16]#const _mm512i& value{}#_mm512_store_si512(result, value)" ) endif() From 35481474babce9b28884ebc1f8df0f80c8b861f4 Mon Sep 17 00:00:00 2001 From: RealTimeChris <40668522+RealTimeChris@users.noreply.github.com> Date: Fri, 22 Sep 2023 09:43:00 -0400 Subject: [PATCH 2/2] Fix: Fixing a typod type in avx.h --- include/dpp/isa/avx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/dpp/isa/avx.h b/include/dpp/isa/avx.h index 9dc66b0d2b..1ba794d712 100644 --- a/include/dpp/isa/avx.h +++ b/include/dpp/isa/avx.h @@ -97,7 +97,7 @@ namespace dpp { for (uint64_t x = 0; x < byte_blocks_per_register; ++x) { new_array[x] = static_cast(values[x]); } - return _mm256_load_ps(new_array); + return _mm_load_ps(new_array); } /**