diff --git a/examples_cuda/volume_rendering/volume.cpp b/examples_cuda/volume_rendering/volume.cpp index fac567f6..2de40c31 100644 --- a/examples_cuda/volume_rendering/volume.cpp +++ b/examples_cuda/volume_rendering/volume.cpp @@ -199,11 +199,12 @@ int main(int argc, char *argv[]) { volume_ispc_tasks(density, n, raster2camera, camera2world, width, height, image); double dt = rtc() - t0; //get_elapsed_mcycles(); - minISPCtasks = std::min(minISPCtasks, dt); + minISPCtasks = std::min(minISPCtasks, dt*1e3); } printf("[volume ispc + tasks]:\t\t[%.3f] million cycles\n", minISPCtasks); writePPM(image, width, height, "volume-ispc-tasks.ppm"); + return 0; // Clear out the buffer for (int i = 0; i < width * height; ++i) diff --git a/examples_cuda/volume_rendering/volume_cu.cpp b/examples_cuda/volume_rendering/volume_cu.cpp index 41a184c9..c85f0bc5 100644 --- a/examples_cuda/volume_rendering/volume_cu.cpp +++ b/examples_cuda/volume_rendering/volume_cu.cpp @@ -478,7 +478,7 @@ int main(int argc, char *argv[]) { &d_raster2camera, &d_camera2world, &width, &height, &d_image}; - const double dt = CUDALaunch(NULL, func_name, func_args); + const double dt = 1e3*CUDALaunch(NULL, func_name, func_args); #endif minISPCtasks = std::min(minISPCtasks, dt); } @@ -499,6 +499,7 @@ int main(int argc, char *argv[]) { printf("[volume ispc + tasks]:\t\t[%.3f] million cycles\n", minISPCtasks); writePPM(image, width, height, "volume-cuda.ppm"); + return 0; #if 0 // Clear out the buffer