We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f690c4 commit 7fc6e12Copy full SHA for 7fc6e12
mlir/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp
@@ -469,6 +469,8 @@ struct ParallelOpLowering : public OpRewritePattern<scf::ParallelOp> {
469
ArrayAttr::get(rewriter.getContext(), reductionDeclSymbols));
470
wsloopOp.getReductionVarsMutable().append(reductionVariables);
471
llvm::SmallVector<bool> byRefVec;
472
+ // false because these reductions always reduce scalars and so do
473
+ // not need to pass by reference
474
byRefVec.resize(reductionVariables.size(), false);
475
wsloopOp.setReductionVarsByref(
476
DenseBoolArrayAttr::get(rewriter.getContext(), byRefVec));
0 commit comments