This commit is contained in:
Evghenii
2013-11-18 10:54:29 +01:00
parent 36f584d341
commit 616cd3316c
2 changed files with 4 additions and 2 deletions

View File

@@ -199,11 +199,12 @@ int main(int argc, char *argv[]) {
volume_ispc_tasks(density, n, raster2camera, camera2world, volume_ispc_tasks(density, n, raster2camera, camera2world,
width, height, image); width, height, image);
double dt = rtc() - t0; //get_elapsed_mcycles(); 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); printf("[volume ispc + tasks]:\t\t[%.3f] million cycles\n", minISPCtasks);
writePPM(image, width, height, "volume-ispc-tasks.ppm"); writePPM(image, width, height, "volume-ispc-tasks.ppm");
return 0;
// Clear out the buffer // Clear out the buffer
for (int i = 0; i < width * height; ++i) for (int i = 0; i < width * height; ++i)

View File

@@ -478,7 +478,7 @@ int main(int argc, char *argv[]) {
&d_raster2camera, &d_camera2world, &d_raster2camera, &d_camera2world,
&width, &height, &width, &height,
&d_image}; &d_image};
const double dt = CUDALaunch(NULL, func_name, func_args); const double dt = 1e3*CUDALaunch(NULL, func_name, func_args);
#endif #endif
minISPCtasks = std::min(minISPCtasks, dt); 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); printf("[volume ispc + tasks]:\t\t[%.3f] million cycles\n", minISPCtasks);
writePPM(image, width, height, "volume-cuda.ppm"); writePPM(image, width, height, "volume-cuda.ppm");
return 0;
#if 0 #if 0
// Clear out the buffer // Clear out the buffer