Skip to content

Commit 1496299

Browse files
committed
Add shared description for the reduction clause
1 parent 2b29935 commit 1496299

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

mlir/include/mlir/Dialect/OpenMP/OpenMPClauses.td

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -949,6 +949,19 @@ class OpenMP_ReductionClauseSkip<
949949
}];
950950

951951
// Description varies depending on the operation.
952+
let description = [{
953+
Reductions can be performed by specifying reduction accumulator variables in
954+
`reduction_vars`, symbols referring to reduction declarations in the
955+
`reductions` attribute, and whether the reduction variable should be passed
956+
into the reduction region by value or by reference in
957+
`reduction_vars_byref`. Each reduction is identified by the accumulator it
958+
uses and accumulators must not be repeated in the same reduction. A private
959+
variable corresponding to the accumulator is used in place of the
960+
accumulator inside the body of the operation. The reduction declaration
961+
specifies how to combine the values from each iteration/section/thread
962+
defined by the operation's region into the final value, which is available
963+
in the accumulator after they all complete.
964+
}];
952965
}
953966

954967
def OpenMP_ReductionClause : OpenMP_ReductionClauseSkip<>;

0 commit comments

Comments
 (0)