File tree 2 files changed +22
-0
lines changed
2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 6
6
A spawn capture allows a spawn statement
7
7
to make a copy of a variable
8
8
prior to the start of asynchronous execution.
9
+ \footnote {DFEP:
10
+ This corresponds to the
11
+ \tcode {firstprivate}
12
+ clause of OpenMP.
13
+ Cilk has no corresponding feature;
14
+ it isn't needed, because only a function-call can be spawned,
15
+ and arguments are guaranteed to be evaluated before the spawn happens.
16
+ }
9
17
A reduction capture allows a task block or parallel loop
10
18
to temporarily associate a reduction object
11
19
with an existing object,
Original file line number Diff line number Diff line change 10
10
and an associated combiner operation,
11
11
along with other optional aspects,
12
12
to support common parallel computations.
13
+ \footnote {DFEP:
14
+ In OpenMP,
15
+ reductions are expressed using clauses referring to variables,
16
+ not using specific types.
17
+ In Cilk,
18
+ reductions are expressed using reduction types,
19
+ which are class types in C++;
20
+ in C, they are composed using macros.
21
+ }
13
22
14
23
\pnum
15
24
Attempting to access an object with reduction type
23
32
is in a new syntactic category for qualifiers of function types.
24
33
It can be used to write functions that can spawn tasks
25
34
and return while some of those tasks are still running.
35
+ \footnote {DFEP:
36
+ Cilk does not have this capability.
37
+ In OpenMP, this can be done implicitly,
38
+ without annotating the function.
39
+ }
26
40
27
41
\sclause {Reduction specifiers}
28
42
\ssclause *{Syntax}
You can’t perform that action at this time.
0 commit comments