Skip to content

Commit 401273d

Browse files
authored
Merge pull request #440 from DiamonDinoia/optimising-foldrescale
Optimising foldrescale and removing pirange and its NU-point 3pi-restriction.
2 parents 79de084 + f6f9873 commit 401273d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+2294
-369
lines changed

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ If not stated, FINUFFT is assumed (cuFINUFFT <=1.3 is listed separately).
1010
* MAX_NF increased from 1e11 to 1e12, since machines grow.
1111
* improved GPU python docs: migration guide; usage from cupy, numba, torch,
1212
pycuda. PyPI pkg still at 2.2.0beta.
13+
* Used new foldrescale and removed tests for the range
1314

1415
V 2.2.0 (12/12/23)
1516

CMakeLists.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ option(FINUFFT_USE_OPENMP "Whether to use OpenMP for parallelization. If disable
3131
option(FINUFFT_USE_CUDA "Whether to build CUDA accelerated FINUFFT library (libcufinufft). This is completely independent of the main FINUFFT library" OFF)
3232
option(FINUFFT_USE_CPU "Whether to build the ordinary FINUFFT library (libfinufft)." ON)
3333
option(FINUFFT_STATIC_LINKING "Whether to link the static FINUFFT library (libfinufft_static)." ON)
34+
option(FINUFFT_BUILD_DEVEL "Whether to build developement executables" OFF)
3435
# sphinx tag (don't remove): @cmake_opts_end
3536

3637
if(FINUFFT_USE_CPU)
@@ -45,10 +46,11 @@ if(FINUFFT_USE_CPU)
4546
endif()
4647

4748
set(CPM_DOWNLOAD_VERSION 0.38.0)
48-
include(cmake/setupCPM.cmake)
49-
5049
set(FFTW_VERSION 3.3.10)
50+
51+
include(cmake/setupCPM.cmake)
5152
include(cmake/setupFFTW.cmake)
53+
5254
endif()
5355

5456
if (FINUFFT_BUILD_MATLAB)
@@ -246,6 +248,10 @@ if (FINUFFT_BUILD_MATLAB)
246248
add_subdirectory(matlab)
247249
endif ()
248250

251+
if (FINUFFT_BUILD_DEVEL)
252+
add_subdirectory(devel)
253+
endif ()
254+
249255
include(GNUInstallDirs)
250256
install(TARGETS ${INSTALL_TARGETS} PUBLIC_HEADER)
251257
install(FILES ${PROJECT_SOURCE_DIR}/LICENSE

CMakePresets.json

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,22 @@
3131
"generator": "Ninja Multi-Config",
3232
"cacheVariables": {
3333
"FINUFFT_BUILD_TESTS": "ON",
34-
"FINUFFT_BUILD_EXAMPLES": "ON"
34+
"FINUFFT_BUILD_EXAMPLES": "ON",
35+
"FINUFFT_BUILD_DEVEL": "ON"
36+
}
37+
},
38+
{
39+
"name": "benchmark",
40+
"binaryDir": "build/benchmark",
41+
"displayName": "Benchmark",
42+
"description": "Benchmark release configuration (ninja)",
43+
"generator": "Ninja",
44+
"cacheVariables": {
45+
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
46+
"FINUFFT_BUILD_TESTS": "ON",
47+
"FINUFFT_BUILD_EXAMPLES": "ON",
48+
"FINUFFT_FFTW_SUFFIX": "",
49+
"FINUFFT_USE_OPENMP": "OFF"
3550
}
3651
},
3752
{
@@ -104,7 +119,7 @@
104119
{
105120
"name": "dev",
106121
"configurePreset": "dev",
107-
"configuration": "Debug"
122+
"configuration": "RelWithDebInfo"
108123
},
109124
{
110125
"name": "ninja-multi",

devel/CMakeLists.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
project(finufft_devel)
2+
# Set the minimum required version of CMake
3+
cmake_minimum_required(VERSION 3.5)
4+
5+
6+
# include cpm cmake, downloading it
7+
CPMAddPackage(
8+
NAME benchmark
9+
GITHUB_REPOSITORY google/benchmark
10+
VERSION 1.8.3
11+
OPTIONS "BENCHMARK_ENABLE_TESTING OFF"
12+
13+
)
14+
15+
if (benchmark_ADDED)
16+
# patch benchmark target
17+
set_target_properties(benchmark PROPERTIES CXX_STANDARD 17)
18+
endif()
19+
20+
add_executable(foldrescale foldrescale.cpp)
21+
target_link_libraries(foldrescale finufft benchmark)
22+
target_compile_options(foldrescale PRIVATE -mavx2)

0 commit comments

Comments
 (0)