@@ -85,6 +85,7 @@ set(OCTOTIGER_CUDA_ARCH "sm_50"
85
85
86
86
set (OCTOTIGER_KOKKOS_SIMD_LIBRARY "KOKKOS" CACHE STRING "Choose either KOKKOS (for kokkos simd types) or STD (for std::experimental::simd." )
87
87
set (OCTOTIGER_KOKKOS_SIMD_EXTENSION "DISCOVER" CACHE STRING "Choose either AVX512 AVX2 VSX NEON SVE SCALAR or DISCOVER (automatic discovery)" )
88
+ set (OCTOTIGER_SVE_LEN "512" CACHE STRING "Choose number of bits for SVE (must be 128, 256 or 512)" )
88
89
89
90
# silence warnings for deprecated HPX includes
90
91
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-cpp" )
@@ -166,6 +167,7 @@ FetchContent_Declare(
166
167
GIT_TAG c845b7d9d8da461457cc5aa88fdda5923773a4bf
167
168
)
168
169
FetchContent_MakeAvailable (kokkossimd )
170
+ set (SVE_LENGTH ${OCTOTIGER_SVE_LEN} )
169
171
FetchContent_Declare (
170
172
svesimd
171
173
GIT_REPOSITORY https://github.com/srinivasyadav18/sve.git
@@ -825,10 +827,14 @@ elseif(${OCTOTIGER_KOKKOS_SIMD_EXTENSION} STREQUAL SVE)
825
827
if (OCTOTIGER_WITH_CXX17 )
826
828
message (FATAL_ERROR "SVE builds with std::experimental::simd require C++20. Please set OCTOTIGER_WITH_CXX20=ON" )
827
829
endif ()
828
- target_compile_definitions (octotiger PUBLIC SVE_LEN=512 )
829
- target_compile_definitions (optionslib PUBLIC SVE_LEN=512 )
830
- target_compile_definitions (octolib PUBLIC SVE_LEN=512 )
831
- target_compile_definitions (hydrolib PUBLIC SVE_LEN=512 )
830
+ target_compile_definitions (octotiger PUBLIC SVE_LEN=${OCTOTIGER_SVE_LEN} )
831
+ target_compile_definitions (optionslib PUBLIC SVE_LEN=${OCTOTIGER_SVE_LEN} )
832
+ target_compile_definitions (octolib PUBLIC SVE_LEN=${OCTOTIGER_SVE_LEN} )
833
+ target_compile_definitions (hydrolib PUBLIC SVE_LEN=${OCTOTIGER_SVE_LEN} )
834
+ target_compile_options (hydrolib PUBLIC "-msve-vector-bits=${OCTOTIGER_SVE_LEN} " )
835
+ target_compile_options (octolib PUBLIC "-msve-vector-bits=${OCTOTIGER_SVE_LEN} " )
836
+ target_compile_options (optionslib PUBLIC "-msve-vector-bits=${OCTOTIGER_SVE_LEN} " )
837
+ target_compile_options (octotiger PUBLIC "-msve-vector-bits=${OCTOTIGER_SVE_LEN} " )
832
838
endif ()
833
839
elseif (${OCTOTIGER_KOKKOS_SIMD_EXTENSION} STREQUAL SCALAR )
834
840
message (STATUS "KOKKOS SIMD extension manually set to SCALAR (SIMD is OFF)" )
0 commit comments