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-30 12:03:59 +0000 |
commit | 953a1b6ab10ccaba48a0bd9031885794b9489063 (patch) | |
tree | f651d1c4f362e7ae5b30b8979b610b47cd09761d | |
parent | bc286e76483c366ba221ce79349a277fb6db32ed (diff) | |
download | regularization-953a1b6ab10ccaba48a0bd9031885794b9489063.tar.gz regularization-953a1b6ab10ccaba48a0bd9031885794b9489063.tar.bz2 regularization-953a1b6ab10ccaba48a0bd9031885794b9489063.tar.xz regularization-953a1b6ab10ccaba48a0bd9031885794b9489063.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) |