Target Directive Clause: Maps a variable from the data environment of the current task to the data environment of the device associated with the construct. For each original list item in this clause, a new corresponding list item is created on the device. This clause only applies to the TARGET directives, which are only available on Intel® MIC Architecture.
MAP([map-type:]list)
THREADPRIVATE variables cannot appear in a MAP clause.
If original and corresponding list items share storage, data races can result when intervening synchronization between tasks does not occur. If variables that share storage are mapped, it causes unspecified behavior.
When a corresponding list item of the original list item is in the data environment of the device associated with the construct:
The new device data environment uses the corresponding list item from the enclosing device data environment.
No additional storage is allocated in the new device data environment.
Initialization and assignment are not performed, regardless of the map-type that is specified.
When a corresponding list item is not in the data environment of the device associated with the construct:
A new list item is derived from the original list item; it becomes the corresponding list item in the new device data environment.
Storage is allocated for the new list item. It has the same type, type parameter, and rank as the original list item.
Initialization and assignment are performed if specified by the map-type.