HOME
| OPENMP API Specification: "Version 5.2 -- GIT rev 95b2e3a44"

5.7.1  copyin Clause

Name: copyin

Properties: data copying

Arguments

Name

Type

Properties

list

list of variable list item type

default

Directives

parallel

Semantics

The copyin clause provides a mechanism to copy the value of a threadprivate variable of the primary thread to the threadprivate variable of each other member of the team that is executing the parallel region.

The copy is performed after the team is formed and prior to the execution of the associated structured block. For variables of non-array type, the copy is by copy assignment. For an array of elements of non-array type, each element is copied as if by assignment from an element of the array of the primary thread to the corresponding element of the array of all other threads.
For class types, the copy assignment operator is invoked. The order in which copy assignment operators for different variables of the same class type are invoked is unspecified.
The copy is performed, as if by assignment, after the team is formed and prior to the execution of the associated structured block.

Named variables that appear in a threadprivate common block may be specified. The whole common block does not need to be specified.

On entry to any parallel region, each thread’s copy of a variable that is affected by a copyin clause for the parallel region will acquire the type parameters, allocation, association, and definition status of the copy of the primary thread, according to the following rules:

Restrictions

Restrictions to the copyin clause are as follows:

Cross References