Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rough idea for the testing #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions themes/MiniFluxDiv/miniFluxdiv-explain-baseline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,25 @@ Real** mini_flux_div_lc(Real** old_boxes,Real** new_boxes,
}
}

// Print out computed values
for (int idx = 0; idx < numBox; idx++) {
Real *hope_box = new_boxes[idx];
for (int iz = 0; iz < numCell; iz++) {
for (int iy = 0; iy < numCell; iy++) {
for (int ix = 0; ix < numCell; ix++) {
for (int c = 0; c < numComp; c++) {
Real hope_val = *(GET_VAL_PTR(hope_box, c, iz, iy, ix));
printf("%d,%d,%d,%d,%f\n", c, iz, iy, ix, hope_val);
}
}
}
}
}

gettimeofday(&tv2, NULL);
double time = (double) (tv2.tv_usec - tv1.tv_usec) / 1000000 +
(double) (tv2.tv_sec - tv1.tv_sec);
measurements.setField("RunTime",time);

return new_boxes;
}