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

Avoid excess allocations in buildUpdateMap #757

Merged
merged 1 commit into from
Mar 20, 2024
Merged
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
6 changes: 3 additions & 3 deletions SparseGrids/tsgGridLocalPolynomial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1266,14 +1266,14 @@ Data2D<int> GridLocalPolynomial::buildUpdateMap(double tolerance, TypeRefinement
int max_1D_parents = rule->getMaxNumParents();

HierarchyManipulations::SplitDirections split(points);

#pragma omp parallel for
std::vector<int> global_to_pnts(num_points);
#pragma omp parallel for firstprivate(global_to_pnts)
for(int j=0; j<split.getNumJobs(); j++){ // split.getNumJobs() gives the number of 1D interpolants to construct
int d = split.getJobDirection(j);
int nump = split.getJobNumPoints(j);
const int *pnts = split.getJobPoints(j);

std::vector<int> global_to_pnts(num_points);

std::vector<int> levels(nump);

int max_level = 0;
Expand Down
Loading