[Mlir-commits] [mlir] [mlir][OpenMP] inscan reduction modifier and scan op mlir support (PR #114737)

Sergio Afonso llvmlistbot at llvm.org
Fri Dec 6 05:02:42 PST 2024


================
@@ -1560,6 +1560,26 @@ def CancellationPointOp : OpenMP_Op<"cancellation_point", clauses = [
   let hasVerifier = 1;
 }
 
+def ScanOp : OpenMP_Op<"scan", [
+    AttrSizedOperandSegments, RecipeInterface, IsolatedFromAbove
+  ], clauses = [
+  OpenMP_InclusiveClause, OpenMP_ExclusiveClause]> {
+  let summary = "scan directive";
+  let description = [{
+    The scan directive allows to specify scan reduction. Scan directive
+    should be enclosed with in a parent directive along with which, a
+    reduction clause with `InScan` modifier must be specified. Scan directive
+    allows to separate code blocks to input phase and scan phase in the region
+    enclosed by the parent.
----------------
skatrak wrote:

```suggestion
    The scan directive allows to specify scan reductions. It
    should be enclosed within a parent directive along with which a
    reduction clause with the `inscan` modifier must be specified. The scan directive
    allows to split code blocks into input phase and scan phase in the region
    enclosed by the parent.
```

https://github.com/llvm/llvm-project/pull/114737


More information about the Mlir-commits mailing list