]>
Commit | Line | Data |
---|---|---|
c63539ff ML |
1 | .. |
2 | Copyright 1988-2022 Free Software Foundation, Inc. | |
3 | This is part of the GCC manual. | |
4 | For copying conditions, see the copyright.rst file. | |
5 | ||
6 | .. _implementing-reduction-clause: | |
7 | ||
8 | Implementing REDUCTION clause | |
9 | ***************************** | |
10 | ||
11 | The private struct mentioned in the previous section should have | |
12 | a pointer to an array of the type of the variable, indexed by the | |
13 | thread's :samp:`{team_id}`. The thread stores its final value into the | |
14 | array, and after the barrier, the primary thread iterates over the | |
3ed1b4ce | 15 | array to collect the values. |