From a82368956ee2174331b7c8d232c80c090f8dc75f Mon Sep 17 00:00:00 2001 From: Evghenii Date: Mon, 18 Nov 2013 10:16:24 +0100 Subject: [PATCH] added ms timer --- examples_cuda/mandelbrot_tasks3d/mandel_cu.cpp | 2 +- examples_cuda/mandelbrot_tasks3d/mandelbrot_tasks3d.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples_cuda/mandelbrot_tasks3d/mandel_cu.cpp b/examples_cuda/mandelbrot_tasks3d/mandel_cu.cpp index 0963984c..f33b3138 100644 --- a/examples_cuda/mandelbrot_tasks3d/mandel_cu.cpp +++ b/examples_cuda/mandelbrot_tasks3d/mandel_cu.cpp @@ -132,7 +132,7 @@ int main(int argc, char *argv[]) { #else const char * func_name = "mandelbrot_ispc"; void *func_args[] = {&x0, &y0, &x1, &y1, &width, &height, &maxIterations, &d_buf}; - const double dt = CUDALaunch(NULL, func_name, func_args); + const double dt = 1e3*CUDALaunch(NULL, func_name, func_args); #endif minISPC = std::min(minISPC, dt); } diff --git a/examples_cuda/mandelbrot_tasks3d/mandelbrot_tasks3d.cpp b/examples_cuda/mandelbrot_tasks3d/mandelbrot_tasks3d.cpp index 6cfabf6f..7460e0b1 100644 --- a/examples_cuda/mandelbrot_tasks3d/mandelbrot_tasks3d.cpp +++ b/examples_cuda/mandelbrot_tasks3d/mandelbrot_tasks3d.cpp @@ -127,7 +127,7 @@ int main(int argc, char *argv[]) { reset_and_start_timer(); const double t0 = rtc(); mandelbrot_ispc(x0, y0, x1, y1, width, height, maxIterations, buf); - double dt = rtc() - t0; //get_elapsed_mcycles(); + double dt = 1e3*(rtc() - t0); //get_elapsed_mcycles(); minISPC = std::min(minISPC, dt); }