File tree Expand file tree Collapse file tree 3 files changed +508
-19
lines changed Expand file tree Collapse file tree 3 files changed +508
-19
lines changed Original file line number Diff line number Diff line change @@ -19,15 +19,28 @@ endif (USE_DOUBLE_PRECISION)
19
19
20
20
cmake_dependent_option (USE_AVX "Use AVX" ON "NOT USE_DOUBLE_PRECISION" OFF )
21
21
if (USE_AVX )
22
- include (avx )
23
- set_avx_flags ()
24
- if (FOUND_AVX2 )
25
- message (STATUS "Using AVX2" )
22
+ set (FOUND_ACCELERATE OFF )
23
+ if (APPLE )
24
+ find_library (ACCELERATE Accelerate )
25
+ endif ()
26
+ if (ACCELERATE )
27
+ set (FOUND_ACCELERATE ON )
28
+ message (STATUS "Using Accelerate" )
29
+ link_libraries (${ACCELERATE} )
30
+ else ()
31
+ include (avx )
32
+ set_avx_flags ()
33
+ if (FOUND_AVX2 )
34
+ message (STATUS "Using AVX2" )
35
+ endif ()
36
+ endif ()
37
+ if (FOUND_ACCELERATE OR FOUND_AVX2 )
38
+ set (FOUND_SIMD ON )
26
39
add_definitions (-DUSE_AVX )
27
40
endif ()
28
41
endif ()
29
42
30
- cmake_dependent_option (USE_PERFORMANCE_OPTIMIZATION "Optimize performance (higher memory consumption)" ON "FOUND_AVX2 " OFF )
43
+ cmake_dependent_option (USE_PERFORMANCE_OPTIMIZATION "Optimize performance (higher memory consumption)" ON "FOUND_SIMD " OFF )
31
44
if (USE_PERFORMANCE_OPTIMIZATION )
32
45
add_definitions ( -DUSE_PERFORMANCE_OPTIMIZATION )
33
46
endif (USE_PERFORMANCE_OPTIMIZATION )
You can’t perform that action at this time.
0 commit comments