diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-03-06 17:03:36 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-03-06 17:03:36 +0000 |
commit | cf527ffe3e4e98e9f4c03ae70f384b292fa5d656 (patch) | |
tree | 6bbaac960962116fe174f845e3514051252a2b72 /contrib | |
parent | bc328b1fd0767fd77bd32f35088ef6e88877d98f (diff) | |
download | rspamd-cf527ffe3e4e98e9f4c03ae70f384b292fa5d656.tar.gz rspamd-cf527ffe3e4e98e9f4c03ae70f384b292fa5d656.zip |
[Minor] Always allow sse in 64bit mode
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/torch/torch7/lib/TH/CMakeLists.txt | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/contrib/torch/torch7/lib/TH/CMakeLists.txt b/contrib/torch/torch7/lib/TH/CMakeLists.txt index 2b71bc3d0..ef5bdd08c 100644 --- a/contrib/torch/torch7/lib/TH/CMakeLists.txt +++ b/contrib/torch/torch7/lib/TH/CMakeLists.txt @@ -165,20 +165,12 @@ ENDIF() ###################################################################### # IF ANY SIMD FOUND -IF(C_AVX2_FOUND OR C_AVX_FOUND OR C_SSE4_2_FOUND OR C_SSE4_1_FOUND) - SET(simd generic/simd/convolve.c) -ENDIF(C_AVX2_FOUND OR C_AVX_FOUND OR C_SSE4_2_FOUND OR C_SSE4_1_FOUND) +IF ("${ARCH}" STREQUAL "x86_64") + SET(simd generic/simd/convolve.c generic/simd/convolve5x5_sse.c) + SET(CMAKE_C_FLAGS "-DUSE_SSE2 ${CMAKE_C_FLAGS}") + SET_SOURCE_FILES_PROPERTIES(generic/simd/convolve5x5_sse.c PROPERTIES COMPILE_FLAGS "-O3 -ffast-math") +ENDIF() -# IF SSE4 FOUND -IF(C_SSE4_1_FOUND AND C_SSE4_2_FOUND) - SET(CMAKE_C_FLAGS "${C_SSE4_1_FLAGS} -DUSE_SSE4_1 ${C_SSE4_2_FLAGS} -DUSE_SSE4_2 ${CMAKE_C_FLAGS}") - IF(MSVC) - SET_SOURCE_FILES_PROPERTIES(generic/simd/convolve5x5_sse.c PROPERTIES COMPILE_FLAGS "/Ox /fp:fast") - ELSE(MSVC) - SET_SOURCE_FILES_PROPERTIES(generic/simd/convolve5x5_sse.c PROPERTIES COMPILE_FLAGS "-O3 -ffast-math") - ENDIF(MSVC) - SET(simd ${simd} generic/simd/convolve5x5_sse.c) -ENDIF(C_SSE4_1_FOUND AND C_SSE4_2_FOUND) # IF AVX FOUND IF(FALSE) |