File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed
Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,9 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
1616# Option to use 32-bit pixel data instead of 16-bit
1717option (PIXEL_DATA_32BIT "Use 32-bit pixel data instead of 16-bit" OFF )
1818
19+ # Option to use double precision for CUDA calculations
20+ option (USE_DOUBLE_PRECISION "Use double precision for CUDA calculations" OFF )
21+
1922include (SetDefaultBuildRelWithDebInfo)
2023include (AlwaysColourCompilation)
2124
@@ -89,6 +92,14 @@ if(PIXEL_DATA_32BIT)
8992else ()
9093 message (STATUS "Building with 16-bit pixel data support" )
9194endif ()
95+
96+ if (USE_DOUBLE_PRECISION)
97+ target_compile_definitions (compile_options INTERFACE USE_DOUBLE_PRECISION)
98+ message (STATUS "Building with double precision" )
99+ else ()
100+ message (STATUS "Building with single precision" )
101+ endif ()
102+
92103# Make a common C++ library for shared code
93104add_library (ffs_common STATIC
94105 src/ffs/ffs_logger.cc
Original file line number Diff line number Diff line change @@ -190,16 +190,16 @@ main() {
190190
191191 # Build production version
192192 if [[ " $PIXEL_32BIT " == " true" ]]; then
193- build_directory " build" " -DPIXEL_DATA_32BIT=ON -DCMAKE_BUILD_TYPE=Release" " production (32-bit)"
193+ build_directory " build" " -DPIXEL_DATA_32BIT=ON -DUSE_DOUBLE_PRECISION=ON - DCMAKE_BUILD_TYPE=Release" " production (32-bit, double precision )"
194194 else
195- build_directory " build" " -DCMAKE_BUILD_TYPE=Release" " production (16-bit)"
195+ build_directory " build" " -DUSE_DOUBLE_PRECISION=ON - DCMAKE_BUILD_TYPE=Release" " production (16-bit, double precision )"
196196 fi
197197 else
198198 print_status " Development build mode"
199199
200200 # Build both 16-bit and 32-bit versions
201- build_directory " build" " -DCMAKE_BUILD_TYPE=RelWithDebInfo" " development (16-bit)"
202- build_directory " build_32bit" " -DPIXEL_DATA_32BIT=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo" " development (32-bit)"
201+ build_directory " build" " -DUSE_DOUBLE_PRECISION=ON - DCMAKE_BUILD_TYPE=RelWithDebInfo" " development (16-bit, double precision )"
202+ build_directory " build_32bit" " -DPIXEL_DATA_32BIT=ON -DUSE_DOUBLE_PRECISION=ON - DCMAKE_BUILD_TYPE=RelWithDebInfo" " development (32-bit, double precision )"
203203 fi
204204
205205 print_success " Build completed successfully!"
You can’t perform that action at this time.
0 commit comments