Commit c986ebb79f38873455f780644da3c04186df2307

Authored by Laila Saadatifard
1 parent 305d252c

fix ivote3 to work

Matlab_3D/validation.m
... ... @@ -14,9 +14,9 @@ vote=7;
14 14 std = [5 5];
15 15 gt_filename = 'gt-128.vol';
16 16 % 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);
17   -out_filename = sprintf('E:/build/ivote3-bld/0-out.%d.vol',t);
  17 +out_filename = sprintf('D:/build/ivote3-bld/0-out.%d.vol',t);
18 18 % 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);
19   -txt_filename = sprintf('E:/build/ivote3-bld/0-t%d-atomic-aabb.txt',t);
  19 +txt_filename = sprintf('D:/build/ivote3-bld/0-t%d-atomic-aabb.txt',t);
20 20 spec = sprintf('Nissl-std%d.%d-r%d.%d-t%d-out%d.%d',std(1), std(2),r1,r2,t,itr,vote);
21 21 fid0 = fopen(gt_filename);
22 22 gt = fread(fid0,[X Y*Z], 'single');
... ...
cpp/CMakeLists.txt
... ... @@ -55,6 +55,6 @@ target_link_libraries(ivote3
55 55 )
56 56  
57 57 #copy an image test case
58   -configure_file(nissl-raw-data/nissl-float-256.256.256.vol ${CMAKE_CURRENT_BINARY_DIR}/nissl-float-256.256.256.vol @ONLY)
59   -configure_file(nissl-raw-data/nissl-float-128.128.128.vol ${CMAKE_CURRENT_BINARY_DIR}/nissl-float-128.128.128.vol @ONLY)
60   -configure_file(nissl-raw-data/nissl-float-64.64.64.vol ${CMAKE_CURRENT_BINARY_DIR}/nissl-float-64.64.64.vol @ONLY)
  58 +configure_file(nissl-raw-data/nissl-float-256.256.256.vol nissl-float-256.256.256.vol COPYONLY)
  59 +configure_file(nissl-raw-data/nissl-float-128.128.128.vol nissl-float-128.128.128.vol COPYONLY)
  60 +configure_file(nissl-raw-data/nissl-float-64.64.64.vol nissl-float-64.64.64.vol COPYONLY)
... ...
cpp/cudafunc.cu
... ... @@ -18,7 +18,7 @@ void ivote3(float* img, float sigma[], float anisotropy, float phi, float d_phi,
18 18 int iter, float t, unsigned int conn[], unsigned int x, unsigned int y, unsigned int z){
19 19  
20 20  
21   - cudaSetDevice(1);
  21 + cudaSetDevice(0);
22 22  
23 23 unsigned int bytes = x * y * z * sizeof(float); // compute the number of bytes in the input data
24 24  
... ... @@ -79,7 +79,7 @@ void ivote3(float* img, float sigma[], float anisotropy, float phi, float d_phi,
79 79 void lmax(float* out, float* in, float t, unsigned int conn[], unsigned int x, unsigned int y, unsigned int z){
80 80 unsigned int bytes = x * y * z * sizeof(float);
81 81  
82   - cudaSetDevice(1);
  82 + cudaSetDevice(0);
83 83  
84 84  
85 85 float* gpuV; //assign memory on gpu for the input data.
... ...