diff options
author | Edoardo Pasca <edo.paskino@gmail.com> | 2018-01-25 12:08:21 +0000 |
---|---|---|
committer | Edoardo Pasca <edo.paskino@gmail.com> | 2018-01-25 12:08:21 +0000 |
commit | 93b6de991c7eb8b3ab96fc9ee01529fea614e326 (patch) | |
tree | abc3221fa2b87fab5c0f9e657285fda4305ca4eb | |
parent | 132f0d71950fdf8abf7da55593b30d8bc19c7ff6 (diff) | |
download | regularization-93b6de991c7eb8b3ab96fc9ee01529fea614e326.tar.gz regularization-93b6de991c7eb8b3ab96fc9ee01529fea614e326.tar.bz2 regularization-93b6de991c7eb8b3ab96fc9ee01529fea614e326.tar.xz regularization-93b6de991c7eb8b3ab96fc9ee01529fea614e326.zip |
compiles the GPU kernels
-rw-r--r-- | Core/CMakeLists.txt | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/Core/CMakeLists.txt b/Core/CMakeLists.txt index 97f8a54..070b45c 100644 --- a/Core/CMakeLists.txt +++ b/Core/CMakeLists.txt @@ -35,7 +35,8 @@ if (Boost_FOUND) endif() ## Build the regularizers package as a library -message("Creating Iterative Reconstruction CGLS as shared library") +message("Creating Regularizers as shared library") + message("CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}") set(CMAKE_BUILD_TYPE "Release") @@ -85,6 +86,9 @@ include_directories(cilreg PUBLIC # EXPORT_FILE_NAME CCPiCore_Exports.h # STATIC_DEFINE cilreg_BUILT_AS_STATIC #) + +## Install + if (UNIX) message ("I'd install into ${CMAKE_INSTALL_PREFIX}/lib") install(TARGETS cilreg @@ -100,7 +104,33 @@ message ("I'd install into ${CMAKE_INSTALL_PREFIX} lib bin") ) endif() +# GPU Regularizers + +find_package(CUDA) +if (CUDA_FOUND) + CUDA_ADD_LIBRARY(cilregcuda SHARED + ${CMAKE_CURRENT_SOURCE_DIR}/regularizers_GPU/Diffus_HO/Diff4th_GPU_kernel.cu + ${CMAKE_CURRENT_SOURCE_DIR}/regularizers_GPU/NL_Regul/NLM_GPU_kernel.cu + ) + if (UNIX) + message ("I'd install into ${CMAKE_INSTALL_PREFIX}/lib") + install(TARGETS cilregcuda + LIBRARY DESTINATION lib + CONFIGURATIONS ${CMAKE_BUILD_TYPE} + ) + elseif(WIN32) + message ("I'd install into ${CMAKE_INSTALL_PREFIX} lib bin") + install(TARGETS cilregcuda + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + CONFIGURATIONS ${CMAKE_BUILD_TYPE} + ) + endif() +else() + message("CUDA NOT FOUND") +endif() + #add_executable(regularizer_test ${CMAKE_CURRENT_SOURCE_DIR}/test/test_regularizer.cpp) -#target_link_libraries (regularizer_test LINK_PUBLIC regularizers_lib)
\ No newline at end of file +#target_link_libraries (regularizer_test LINK_PUBLIC regularizers_lib) |