diff --git a/CMakeLists.txt b/CMakeLists.txt index a36c0589..d23c40e1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -198,7 +198,7 @@ function(finufft_link_test target) if(FINUFFT_USE_DUCC0) target_compile_definitions(${target} PRIVATE FINUFFT_USE_DUCC0) endif() - target_link_libraries(${target} PRIVATE finufft ${FINUFFT_FFTLIBS}) + target_link_libraries(${target} PRIVATE finufft xsimd ${FINUFFT_FFTLIBS}) if(FINUFFT_USE_OPENMP) target_link_libraries(${target} PRIVATE OpenMP::OpenMP_CXX) target_link_options(${target} PRIVATE ${OpenMP_CXX_FLAGS}) diff --git a/perftest/CMakeLists.txt b/perftest/CMakeLists.txt index 29019b0f..f0215a6d 100644 --- a/perftest/CMakeLists.txt +++ b/perftest/CMakeLists.txt @@ -6,7 +6,6 @@ foreach(TEST ${PERFTESTS}) if(FINUFFT_USE_DUCC0) target_compile_definitions(${TEST} PRIVATE -DFINUFFT_USE_DUCC0) endif() - target_link_libraries(${TEST} PRIVATE xsimd) finufft_link_test(${TEST}) add_executable(${TEST}f ${TEST}.cpp) @@ -14,7 +13,6 @@ foreach(TEST ${PERFTESTS}) if(FINUFFT_USE_DUCC0) target_compile_definitions(${TEST}f PRIVATE -DFINUFFT_USE_DUCC0) endif() - target_link_libraries(${TEST}f PRIVATE xsimd) finufft_link_test(${TEST}f) endforeach() diff --git a/src/spreadinterp.cpp b/src/spreadinterp.cpp index 97c0126a..9858f5cc 100644 --- a/src/spreadinterp.cpp +++ b/src/spreadinterp.cpp @@ -219,8 +219,7 @@ void print_subgrid_info(int ndims, BIGINT offset1, BIGINT offset2, BIGINT offset */ template static FINUFFT_ALWAYS_INLINE T fold_rescale(const T x, const UBIGINT N) noexcept { - static constexpr const T x2pi = T(INV_2PI); - const T result = x * x2pi + T(0.5); + const T result = x * T(INV_2PI) + T(0.5); return (result - floor(result)) * T(N); } diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 654dac5e..3736c2ca 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -13,13 +13,11 @@ set(TESTS foreach(TEST ${TESTS}) add_executable(${TEST} ${TEST}.cpp) target_compile_features(${TEST} PRIVATE cxx_std_17) - target_link_libraries(${TEST} PRIVATE xsimd) finufft_link_test(${TEST}) add_executable(${TEST}f ${TEST}.cpp) target_compile_definitions(${TEST}f PRIVATE -DSINGLE) target_compile_features(${TEST}f PRIVATE cxx_std_17) - target_link_libraries(${TEST}f PRIVATE xsimd) finufft_link_test(${TEST}f) endforeach() @@ -32,7 +30,6 @@ add_executable(testutils testutils.cpp) if(FINUFFT_USE_DUCC0) target_compile_definitions(testutils PRIVATE -DFINUFFT_USE_DUCC0) endif() -target_link_libraries(testutils PRIVATE xsimd) target_compile_features(testutils PRIVATE cxx_std_17) finufft_link_test(testutils) add_test( @@ -43,7 +40,6 @@ add_test( if(NOT FINUFFT_USE_DUCC0) add_executable(fftw_lock_test fftw_lock_test.cpp) target_compile_features(fftw_lock_test PRIVATE cxx_std_17) - target_link_libraries(fftw_lock_test PRIVATE xsimd) finufft_link_test(fftw_lock_test) add_test(