From a7712dadae45f929abb2609995f4fbfce7a01356 Mon Sep 17 00:00:00 2001 From: plsusedcurtisatmit Date: Fri, 15 Jul 2022 20:50:16 +0000 Subject: [PATCH] =?UTF-8?q?Update=20Reference=20=E2=80=9Copencilk-language?= =?UTF-8?q?-specification=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reference/opencilk-language-specification.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/doc/reference/opencilk-language-specification.md b/src/doc/reference/opencilk-language-specification.md index 8d4d3a16..48a1eca6 100644 --- a/src/doc/reference/opencilk-language-specification.md +++ b/src/doc/reference/opencilk-language-specification.md @@ -152,7 +152,7 @@ A new form of Statement is introduced: _Cilk_scope { Statement* } -Statements within _Cilk_scope are executed as usual. There is an implicit _Cilk_sync at the end of the statements included within _Cilk_scope. +Statements within _Cilk_scope are executed as usual. There is an implicit _Cilk_sync at the end of the statements included within the _Cilk_scope construct. ## Semantics @@ -196,11 +196,11 @@ Statements within _Cilk_scope are executed as usual. There is an implicit _Cilk

The serialization of a pure C or C++ program is itself.

If a C or C++ program has defined behavior and does not use the tasking keywords or library functions, it is an OpenCilk with the same defined behavior.

-

The serializations of _Cilk_spawn and _Cilk_sync +

The serializations of _Cilk_scope, _Cilk_spawn and _Cilk_sync are empty.

If an OpenCilk program has defined deterministic behavior, then that behavior is the same as the behavior of the C or C++ program derived from the original by removing - all instances of the keywords _Cilk_spawn, and _Cilk_sync.

+ all instances of the keywords _Cilk_scope, _Cilk_spawn, and _Cilk_sync.

The serialization of _Cilk_for is for.

If an OpenCilk program has defined deterministic behavior, then that behavior is the same as the behavior of the C or C++ program derived from the original by replacing @@ -689,9 +689,9 @@ else ((first) - (limit)) /

The call to function f is the spawn point and the statement a++; is the continuation. The expression a + b and the initialization of - the temporary variable holding that value, and the evaluation of x\\\\[g()] + the temporary variable holding that value, and the evaluation of x\\\\\[g()] take place before the spawn point. The execution of f, the assignment - to x\\\\[g()], and the destruction of the temporary variable holding + to x\\\\\[g()], and the destruction of the temporary variable holding a + b take place in the child.

If a statement is followed by an implicit sync, that sync is the spawn continuation.

Programmer note: The sequencing may be more clear if

@@ -1204,8 +1204,8 @@ void T_destroy(void* r, void* view); T_reduce - Evaluate “\\\\*(T\\\\*)left = \\\\*(T\\\\*) left - ⊗ \\\\*(T\\\\*) right” + Evaluate “\\\\\*(T\\\\\*)left = \\\\\*(T\\\\\*) left + ⊗ \\\\\*(T\\\\\*) rightT_identity