Skip to content

Commit

Permalink
Added requirement for sse3
Browse files Browse the repository at this point in the history
  • Loading branch information
WillisMedwell committed Jan 25, 2024
1 parent c886b69 commit 44140e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/.clang-format DESTINATION ${CMAKE_CURRENT_
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/.clang-tidy DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

if(DEFINED EMSCRIPTEN)
message(STATUS "For Emscripten SIMD use flags: \"-msimd128 -mrelaxed-simd -msse -msse2 -mavx\"")
message(STATUS "For Emscripten SIMD use flags: \"-msimd128 -mrelaxed-simd -msse -msse2 -msse3 -mavx\"")
elseif(NOT MSVC)
target_compile_options(Utily_Utily PRIVATE "-Wall" "-Wextra" "-Wpedantic" "-Wcast-align" "-Wcast-qual" "-Wctor-dtor-privacy" "-Wformat=2" "-Winit-self" "-Wmissing-declarations" "-Wmissing-include-dirs" "-Wold-style-cast" "-Woverloaded-virtual" "-Wredundant-decls" "-Wshadow" "-Wsign-conversion" "-Wsign-promo" "-Wstrict-overflow=5" "-Wswitch-default" "-Wundef" "-Wno-unused" "-Wconversion" "-Wsign-compare")
message(STATUS "For Native SIMD use flags: \"-march=native\"")
Expand Down Expand Up @@ -53,7 +53,7 @@ if(BUILD_UTILY_TESTS)
add_executable(UtilyTest ${UTILY_TEST_SOURCES})
if(DEFINED EMSCRIPTEN)
target_compile_options(UtilyTest PRIVATE "-Wdeprecated-declarations")
target_compile_options(UtilyTest PRIVATE -msimd128 -mrelaxed-simd -msse -msse2 -mavx)
target_compile_options(UtilyTest PRIVATE -msimd128 -mrelaxed-simd -msse -msse2 -msse3 -mavx)
set(CMAKE_EXECUTABLE_SUFFIX ".html")
elseif(NOT MSVC)
target_compile_options(UtilyTest PRIVATE "-Wall" "-Wextra" "-Wpedantic" "-Wcast-align" "-Wcast-qual" "-Wctor-dtor-privacy" "-Wformat=2" "-Winit-self" "-Wmissing-declarations" "-Wmissing-include-dirs" "-Wold-style-cast" "-Woverloaded-virtual" "-Wredundant-decls" "-Wshadow" "-Wsign-conversion" "-Wsign-promo" "-Wstrict-overflow=5" "-Wswitch-default" "-Wundef" "-Wno-unused" "-Wconversion" "-Wsign-compare")
Expand Down Expand Up @@ -97,7 +97,7 @@ if(BUILD_UTILY_BENCHMARKS)
endforeach()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PRELOAD_FILES} -Wno-unused-command-line-argument")
target_compile_options(UtilyBenchmark PRIVATE -Wno-deprecated-declarations -Wno-unused-command-line-argument)
target_compile_options(UtilyBenchmark PRIVATE -msimd128 -mrelaxed-simd -msse -msse2 -mavx)
target_compile_options(UtilyBenchmark PRIVATE -msimd128 -mrelaxed-simd -msse -msse2 -msse3 -mavx)
elseif(NOT MSVC)
target_compile_options(UtilyBenchmark PRIVATE "-Wall" "-Wextra" "-Wpedantic" "-Wcast-align" "-Wcast-qual" "-Wctor-dtor-privacy" "-Wformat=2" "-Winit-self" "-Wmissing-declarations" "-Wmissing-include-dirs" "-Wold-style-cast" "-Woverloaded-virtual" "-Wredundant-decls" "-Wshadow" "-Wsign-conversion" "-Wsign-promo" "-Wstrict-overflow=5" "-Wswitch-default" "-Wundef" "-Wno-unused" "-Wconversion" "-Wsign-compare")
target_compile_options(UtilyBenchmark PRIVATE -march=native)
Expand Down
2 changes: 1 addition & 1 deletion include/Utily/Simd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <iostream>

// Check for SSE support
#if defined(__SSE__) && defined(__SSE2__)
#if defined(__SSE__) && defined(__SSE2__) && defined(__SSE3__)
#define UTY_SUPPORTS_128 1
#include <emmintrin.h>
#include <xmmintrin.h>
Expand Down

0 comments on commit 44140e6

Please sign in to comment.