From c986ebb79f38873455f780644da3c04186df2307 Mon Sep 17 00:00:00 2001 From: laila Saadatifard Date: Fri, 8 Jul 2016 11:31:46 -0500 Subject: [PATCH] fix ivote3 to work --- Matlab_3D/validation.m | 4 ++-- cpp/CMakeLists.txt | 6 +++--- cpp/cudafunc.cu | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Matlab_3D/validation.m b/Matlab_3D/validation.m index aba2418..4c45605 100644 --- a/Matlab_3D/validation.m +++ b/Matlab_3D/validation.m @@ -14,9 +14,9 @@ vote=7; std = [5 5]; gt_filename = 'gt-128.vol'; % out_filename = sprintf('128-128-128/0-nissl-std%d.%d-t0%d-r%d.%d-t%d-out%d.%d.vol',std(1), std(2),t0,r1,r2,t,itr,vote); -out_filename = sprintf('E:/build/ivote3-bld/0-out.%d.vol',t); +out_filename = sprintf('D:/build/ivote3-bld/0-out.%d.vol',t); % txt_filename = sprintf('128-128-128/0-validation-nissl-std%d.%d-r%d.%d-t%d-out%d.%d-D%d.txt',std(1), std(2),r1,r2,t,itr,vote,D); -txt_filename = sprintf('E:/build/ivote3-bld/0-t%d-atomic-aabb.txt',t); +txt_filename = sprintf('D:/build/ivote3-bld/0-t%d-atomic-aabb.txt',t); spec = sprintf('Nissl-std%d.%d-r%d.%d-t%d-out%d.%d',std(1), std(2),r1,r2,t,itr,vote); fid0 = fopen(gt_filename); gt = fread(fid0,[X Y*Z], 'single'); diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 8a5a3a0..d35d37b 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -55,6 +55,6 @@ target_link_libraries(ivote3 ) #copy an image test case -configure_file(nissl-raw-data/nissl-float-256.256.256.vol ${CMAKE_CURRENT_BINARY_DIR}/nissl-float-256.256.256.vol @ONLY) -configure_file(nissl-raw-data/nissl-float-128.128.128.vol ${CMAKE_CURRENT_BINARY_DIR}/nissl-float-128.128.128.vol @ONLY) -configure_file(nissl-raw-data/nissl-float-64.64.64.vol ${CMAKE_CURRENT_BINARY_DIR}/nissl-float-64.64.64.vol @ONLY) +configure_file(nissl-raw-data/nissl-float-256.256.256.vol nissl-float-256.256.256.vol COPYONLY) +configure_file(nissl-raw-data/nissl-float-128.128.128.vol nissl-float-128.128.128.vol COPYONLY) +configure_file(nissl-raw-data/nissl-float-64.64.64.vol nissl-float-64.64.64.vol COPYONLY) diff --git a/cpp/cudafunc.cu b/cpp/cudafunc.cu index 8ecbe66..a7786d5 100644 --- a/cpp/cudafunc.cu +++ b/cpp/cudafunc.cu @@ -18,7 +18,7 @@ void ivote3(float* img, float sigma[], float anisotropy, float phi, float d_phi, int iter, float t, unsigned int conn[], unsigned int x, unsigned int y, unsigned int z){ - cudaSetDevice(1); + cudaSetDevice(0); unsigned int bytes = x * y * z * sizeof(float); // compute the number of bytes in the input data @@ -79,7 +79,7 @@ void ivote3(float* img, float sigma[], float anisotropy, float phi, float d_phi, void lmax(float* out, float* in, float t, unsigned int conn[], unsigned int x, unsigned int y, unsigned int z){ unsigned int bytes = x * y * z * sizeof(float); - cudaSetDevice(1); + cudaSetDevice(0); float* gpuV; //assign memory on gpu for the input data. -- libgit2 0.21.4