added ms timer
This commit is contained in:
@@ -132,7 +132,7 @@ int main(int argc, char *argv[]) {
|
|||||||
#else
|
#else
|
||||||
const char * func_name = "mandelbrot_ispc";
|
const char * func_name = "mandelbrot_ispc";
|
||||||
void *func_args[] = {&x0, &y0, &x1, &y1, &width, &height, &maxIterations, &d_buf};
|
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
|
#endif
|
||||||
minISPC = std::min(minISPC, dt);
|
minISPC = std::min(minISPC, dt);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ int main(int argc, char *argv[]) {
|
|||||||
reset_and_start_timer();
|
reset_and_start_timer();
|
||||||
const double t0 = rtc();
|
const double t0 = rtc();
|
||||||
mandelbrot_ispc(x0, y0, x1, y1, width, height, maxIterations, buf);
|
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);
|
minISPC = std::min(minISPC, dt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user