summaryrefslogtreecommitdiffstats
path: root/Wrappers
diff options
context:
space:
mode:
authoralgol <dkazanc@hotmail.com>2018-08-13 16:39:25 +0100
committeralgol <dkazanc@hotmail.com>2018-08-13 16:39:25 +0100
commit135015685959c6168930951fcb50d46bc9aeddd7 (patch)
tree6a3ffa90b11bc2486e7678d4949944b29b55a507 /Wrappers
parent72a4bade63280d8683d010d4165aa416b0aed56f (diff)
downloadregularization-135015685959c6168930951fcb50d46bc9aeddd7.tar.gz
regularization-135015685959c6168930951fcb50d46bc9aeddd7.tar.bz2
regularization-135015685959c6168930951fcb50d46bc9aeddd7.tar.xz
regularization-135015685959c6168930951fcb50d46bc9aeddd7.zip
fixed matlab wrappers compilation GPU
Diffstat (limited to 'Wrappers')
-rwxr-xr-xWrappers/Matlab/CMakeLists.txt45
1 files changed, 26 insertions, 19 deletions
diff --git a/Wrappers/Matlab/CMakeLists.txt b/Wrappers/Matlab/CMakeLists.txt
index cd46051..837993d 100755
--- a/Wrappers/Matlab/CMakeLists.txt
+++ b/Wrappers/Matlab/CMakeLists.txt
@@ -75,18 +75,18 @@ foreach(tgt RANGE 0 ${num})
NAME ${current_target}
SRC
${current_file_name}
- ${CMAKE_SOURCE_DIR}/Core/regularisers_CPU/FGP_TV_core.c
- ${CMAKE_SOURCE_DIR}/Core/regularisers_CPU/SB_TV_core.c
- ${CMAKE_SOURCE_DIR}/Core/regularisers_CPU/TGV_core.c
- ${CMAKE_SOURCE_DIR}/Core/regularisers_CPU/Diffusion_core.c
- ${CMAKE_SOURCE_DIR}/Core/regularisers_CPU/Diffus4th_order_core.c
- ${CMAKE_SOURCE_DIR}/Core/regularisers_CPU/LLT_ROF_core.c
- ${CMAKE_SOURCE_DIR}/Core/regularisers_CPU/ROF_TV_core.c
- ${CMAKE_SOURCE_DIR}/Core/regularisers_CPU/FGP_dTV_core.c
- ${CMAKE_SOURCE_DIR}/Core/regularisers_CPU/TNV_core.c
- ${CMAKE_SOURCE_DIR}/Core/regularisers_CPU/utils.c
- ${CMAKE_SOURCE_DIR}/Core/inpainters_CPU/Diffusion_Inpaint_core.c
- ${CMAKE_SOURCE_DIR}/Core/inpainters_CPU/NonlocalMarching_Inpaint_core.c
+ #${CMAKE_SOURCE_DIR}/Core/regularisers_CPU/FGP_TV_core.c
+ #${CMAKE_SOURCE_DIR}/Core/regularisers_CPU/SB_TV_core.c
+ #${CMAKE_SOURCE_DIR}/Core/regularisers_CPU/TGV_core.c
+ #${CMAKE_SOURCE_DIR}/Core/regularisers_CPU/Diffusion_core.c
+ #${CMAKE_SOURCE_DIR}/Core/regularisers_CPU/Diffus4th_order_core.c
+ #${CMAKE_SOURCE_DIR}/Core/regularisers_CPU/LLT_ROF_core.c
+ #${CMAKE_SOURCE_DIR}/Core/regularisers_CPU/ROF_TV_core.c
+ #${CMAKE_SOURCE_DIR}/Core/regularisers_CPU/FGP_dTV_core.c
+ #${CMAKE_SOURCE_DIR}/Core/regularisers_CPU/TNV_core.c
+ #${CMAKE_SOURCE_DIR}/Core/regularisers_CPU/utils.c
+ #${CMAKE_SOURCE_DIR}/Core/inpainters_CPU/Diffusion_Inpaint_core.c
+ #${CMAKE_SOURCE_DIR}/Core/inpainters_CPU/NonlocalMarching_Inpaint_core.c
LINK_TO cilreg ${Matlab_LIBRARIES}
)
@@ -107,26 +107,33 @@ if (BUILD_CUDA)
find_package(CUDA)
if (CUDA_FOUND)
file(GLOB GPU_MEX_FILES
- "${CMAKE_SOURCE_DIR}/Wrappers/Matlab/mex_compile/regularisers_GPU/*.c"
+ "${CMAKE_SOURCE_DIR}/Wrappers/Matlab/mex_compile/regularisers_GPU/*.cpp"
)
list(LENGTH GPU_MEX_FILES num)
-
+message("number of GPU files " ${num})
MATH(EXPR num "${num}-1")
#set(num "-1")
foreach(tgt RANGE ${num})
message("number " ${tgt})
- #list(GET CPU_TARGETS ${tgt} current_target)
- list(GET GPU_MEX_FILES ${tgt} current_file)
- get_filename_component(current_target ${current_file} NAME)
+ list(LENGTH GPU_MEX_FILES num2)
+ message("the list is ${num2}")
+ #list(GET CPU_TARGETS ${tgt} current_target)
+ list(GET GPU_MEX_FILES ${tgt} current_file_name)
+ get_filename_component(current_file ${current_file_name} NAME)
+ string(REGEX MATCH "(.+).c" match ${current_file})
+ if (NOT ${match} EQUAL "" )
+ set (current_target ${CMAKE_MATCH_1})
+ endif()
+ message("matlab_add_mex target " ${current_file} " and " ${current_target})
message("matlab_add_mex " ${current_target})
matlab_add_mex(
NAME ${current_target}
SRC
- ${current_file}
- LINK_TO cilreg ${Matlab_LIBRARIES}
+ ${current_file_name}
+ LINK_TO cilregcuda ${Matlab_LIBRARIES}
)
target_include_directories(${current_target}