Name: copyprivate | Properties: end-clause, data copying |
|
Arguments
Name | Type | Properties |
list | list of variable list item type | |
|
Directives
Semantics
The copyprivate clause provides a mechanism to use a private variable to broadcast a value from the data environment of one implicit task to the data environments of the other implicit tasks that belong to the parallel region. The effect of the copyprivate clause on the specified list items occurs after the execution of the structured block associated with the associated construct, and before any of the threads in the team have left the barrier at the end of the construct. To avoid data races, concurrent reads or updates of the list item must be synchronized with the update of the list item that occurs as a result of the copyprivate clause if, for example, the nowait clause is used to remove the barrier.The order in which any final subroutines for different variables of a finalizable type are called is unspecified.
Restrictions
Restrictions to the copyprivate clause are as follows:All list items that appear in a copyprivate clause must be either threadprivate or private in the enclosing context.
Cross References