-
Notifications
You must be signed in to change notification settings - Fork 499
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
grt: parallel getOverflow3D #5215
base: master
Are you sure you want to change the base?
grt: parallel getOverflow3D #5215
Conversation
Signed-off-by: Grzegorz Latosinski <[email protected]>
Signed-off-by: Eder Monteiro <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
for (int iter = 0; iter < num_layers_ * y_grid_ * x_grid_; iter++) { | ||
int k = iter / kstep; | ||
int i = (iter % kstep) / istep; | ||
int j = (iter % kstep) % istep; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It think it would be simpler to keep the original loop structure and apply collapse(2)
to the prama. The original loop was over h_used_ggrid_ rather than all points.
int overflow = h_edges_3D_[k][i][j].usage - h_edges_3D_[k][i][j].cap; | ||
H_overflow += overflow > 0 ? overflow : 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find
const auto& h_edge = h_edges_3D_[k][i][j];
H_overflow += std::max(h_edge.usage - h_edge.cap, 0);
clearer. Likewise V
Completing PR #4636