[MLIR] Update documentation for loop.parallel.

Differential Revision: https://reviews.llvm.org/D78562
This commit is contained in:
Alexander Belyaev 2020-04-21 16:00:28 +02:00
parent ca59ff5af9
commit 84e4c09995
1 changed files with 4 additions and 3 deletions

View File

@ -294,9 +294,10 @@ def ParallelOp : Loop_Op<"parallel",
Example:
```mlir
loop.parallel (%iv) = (%lb) to (%ub) step (%step) -> f32 {
%zero = constant 0.0 : f32
loop.reduce(%zero) : f32 {
%init = constant 0.0 : f32
loop.parallel (%iv) = (%lb) to (%ub) step (%step) init (%init) -> f32 {
%elem_to_reduce = load %buffer[%iv] : memref<100xf32>
loop.reduce(%elem_to_reduce) : f32 {
^bb0(%lhs : f32, %rhs: f32):
%res = addf %lhs, %rhs : f32
loop.reduce.return %res : f32