30 gettimeofday(&t1, NULL); \ 31 dt = ((t1.tv_sec - t0.tv_sec) * 1000. + \ 32 (t1.tv_usec - t0.tv_usec + 0.) / 1000.); \ 38 struct timeval t0, t1;
44 for (
int i = 0;
i < 40; ++
i)
45 for (
int j = 0; j < 40; ++j) P(
i, j) = (
rand() + 1.) / RAND_MAX;
46 for (
int i = 0;
i < J.rows(); ++
i)
47 for (
int j = 0; j < J.cols(); ++j) J(
i, j) = (
rand() + 1.) / RAND_MAX;
51 gettimeofday(&t0, NULL);
52 for (
int iter = 0; iter < nbIter; ++iter) {
53 gettimeofday(&t0, NULL);
57 gettimeofday(&t1, NULL);
58 dt += ((
double)(t1.tv_sec - t0.tv_sec) +
59 (
double)(t1.tv_usec - t0.tv_usec) / 1000. / 1000.);
62 cout << dt / nbIter << endl;
#define sotDEBUGOUT(level)
#define sotDEBUGIN(level)