Skip to content

Commit

Permalink
Some works on GPU code for CT application
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienBert committed Oct 16, 2012
1 parent 9d2f5bd commit 24de04f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion source/gpu/src/actor_ct_fun.cu
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,10 @@ __global__ void kernel_ct_navigation_regular(StackParticle photons,
// Get material
T1 material = phantom.data[index_phantom.w];
// FIXME TO DEBUG
material = 1;
//material = 1;
if (material == 1) {material = 0;} // Air
if (material == 2) {material = 13;} // Brain
if (material == 3) {material = 7;} // RibBone

//// Find next discrete interaction ///////////////////////////////////////

Expand Down
8 changes: 4 additions & 4 deletions source/gpu/src/actor_ct_track.cu
Original file line number Diff line number Diff line change
Expand Up @@ -165,17 +165,17 @@ void GateTrackingGPUActorTrack(const GateTrackingGPUActorInput * input,


// TIMING
//t_out = time() - t_out;
t_out = time() - t_out;

stack_device_free(photons_d);
stack_host_free(photons_h);
//volume_device_free(phantom_d);


cudaDeviceSynchronize();
//t_g = time() - t_g;
//printf(">> GPU: init %e input %e track %e output %e tot %e\n", t_init+t_init_2,
// t_in, t_track, t_out, t_g);
t_g = time() - t_g;
printf(">> GPU: init %e input %e track %e output %e tot %e\n", t_init+t_init_2,
t_in, t_track, t_out, t_g);

cudaThreadExit();
printf("====> GPU STOP\n");
Expand Down

0 comments on commit 24de04f

Please sign in to comment.