@@ -12,6 +12,9 @@ function(generate_pipeline target_name generated_files_output)
1212 cuda_include_directories (${ViennaPS_SOURCE_DIR } /include/viennaps )
1313 cuda_include_directories (${ViennaCore_SOURCE_DIR } /include/viennacore )
1414 add_compile_definitions (VIENNACORE_COMPILE_GPU )
15+ if (VIENNARAY_GPU_DOUBLE_PRECISION)
16+ add_compile_definitions (VIENNARAY_GPU_DOUBLE_PRECISION )
17+ endif ()
1518
1619 # Generate OptiX IR files if enabled
1720 if (VIENNAPS_GENERATE_OPTIXIR)
@@ -54,6 +57,9 @@ function(generate_kernel target_name generated_files_output)
5457 cuda_include_directories (${ViennaCore_SOURCE_DIR } /include/viennacore )
5558 cuda_include_directories (${VIENNARAY_GPU_INCLUDE} ${VIENNAPS_GPU_INCLUDE} )
5659 add_compile_definitions (VIENNACORE_COMPILE_GPU )
60+ if (VIENNARAY_GPU_DOUBLE_PRECISION)
61+ add_compile_definitions (VIENNARAY_GPU_DOUBLE_PRECISION )
62+ endif ()
5763
5864 cuda_wrap_srcs (
5965 ${target_name}
@@ -100,6 +106,9 @@ function(add_GPU_executable target_name_base target_name_var)
100106 cuda_include_directories (${ViennaPS_SOURCE_DIR } /include/viennaps )
101107 cuda_include_directories (${ViennaCore_SOURCE_DIR } /include/viennacore )
102108 add_compile_definitions (VIENNACORE_COMPILE_GPU )
109+ if (VIENNARAY_GPU_DOUBLE_PRECISION)
110+ add_compile_definitions (VIENNARAY_GPU_DOUBLE_PRECISION )
111+ endif ()
103112
104113 # Create CUDA kernels
105114 cuda_wrap_srcs (
@@ -145,7 +154,7 @@ function(add_GPU_executable target_name_base target_name_var)
145154 # Here is where we create the rule to make the executable. We define a target name and
146155 # list all the source files used to create the target. In addition we also pass along
147156 # the cmake_options parsed out of the arguments.
148- message (STATUS "Adding target: ${target_name} " )
157+ message (STATUS "Adding GPU target: ${target_name} " )
149158 add_executable (${target_name} ${source_files} ${generated_files} ${cmake_options} )
150159 target_include_directories (${target_name} PRIVATE ${VIENNARAY_GPU_INCLUDE}
151160 ${VIENNAPS_GPU_INCLUDE} )
0 commit comments