Skip to content

Commit

Permalink
Merge pull request #1589 from zenustech/zeno2-fixbug
Browse files Browse the repository at this point in the history
temp fix: disable omp collapse on grid prim, because of the incompati…
  • Loading branch information
littlemine authored Dec 7, 2023
2 parents 5269aa4 + b6f8c2a commit a954f77
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions zeno/src/nodes/prim/MakeGridPrimitive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ struct Make2DGridPrimitive : INode {

auto layout = get_param<std::string>("Layout");
if (layout == "Column-major") {
#pragma omp parallel for collapse(2)
#pragma omp parallel for
for (intptr_t y = 0; y < ny; y++)
for (intptr_t x = 0; x < nx; x++) {
intptr_t index = y * nx + x;
Expand All @@ -162,7 +162,7 @@ struct Make2DGridPrimitive : INode {
}
if (get_param<bool>("hasFaces")) {
prim->tris.resize((nx - 1) * (ny - 1) * 2);
#pragma omp parallel for collapse(2)
#pragma omp parallel for
for (intptr_t y = 0; y < ny - 1; y++)
for (intptr_t x = 0; x < nx - 1; x++) {
intptr_t index = y * (nx - 1) + x;
Expand All @@ -175,7 +175,7 @@ struct Make2DGridPrimitive : INode {
}
}
} else {
#pragma omp parallel for collapse(2)
#pragma omp parallel for
for (intptr_t x = 0; x < nx; x++)
for (intptr_t y = 0; y < ny; y++) {
intptr_t index = x * ny + y;
Expand All @@ -195,7 +195,7 @@ struct Make2DGridPrimitive : INode {

if (get_param<bool>("hasFaces")) {
prim->tris.resize((nx - 1) * (ny - 1) * 2);
#pragma omp parallel for collapse(2)
#pragma omp parallel for
for (intptr_t x = 0; x < nx - 1; x++)
for (intptr_t y = 0; y < ny - 1; y++) {
intptr_t index = x * (ny - 1) + y;
Expand Down

0 comments on commit a954f77

Please sign in to comment.