Visible to Intel only — GUID: GUID-C1CA9B1D-FA9C-4A0D-A838-AA27D279FF46
Visible to Intel only — GUID: GUID-C1CA9B1D-FA9C-4A0D-A838-AA27D279FF46
MAP Clause
Clause for TARGET Directives: Maps a variable from the data environment of the current task to the data environment of the device associated with the construct. This clause only applies to certain TARGET directives. This feature is only available for ifx.
MAP ([[map-type-modifier[,]] map-type :] list)
map-type-modifier |
Is one of the following:
|
||||||||||||
map-type |
Determines how a list item is initialized. Possible values are:
If a map-type is not specified, the default is TOFROM. The map initialization and assignment are done as if by intrinsic assignment, that is, through bitwise copy. |
||||||||||||
list |
Is the name of one or more variables, array sections, or common blocks that are accessible to the scoping unit. Subobjects cannot be specified. Each name must be separated by a comma, and a common block name must appear between slashes (/ /). If a list item is an array section, it must specify contiguous storage. A list item can appear in at most one of the TO, FROM, or TOFROM clauses. If a list item appears in an ALLOC clause, it cannot appear on a TO or TOFROM clause. |
On entry to an outermost target region where this clause is used, for each original list item, a new corresponding list item is created on the device. On exit from the outermost target region, if the corresponding list item is present on the device, it is then deleted from the device.
At least one MAP clause must appear in a directive that allows the clause.
THREADPRIVATE variables cannot appear in a MAP clause.
For the TARGET ENTER DATA directive, map-type must be either TO or ALLOC.
For the TARGET EXIT DATA directive, map-type must be FROM, RELEASE, or DELETE.
For the TARGET and TARGET DATA directives, map-type must be TO, FROM, TOFROM, or ALLOC.
For the TARGET UPDATE directive, map-type must be TO or FROM.
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.
Any variables within a TARGET MAP region that are not specified in a MAP clause are treated as shared variables within the region.
A list item must not contain any components that have the ALLOCATABLE attribute.
If the allocation status of a list item with the ALLOCATABLE attribute is unallocated upon entry to a target region, the list item must be unallocated upon exit from the region.
If the allocation status of a list item with the ALLOCATABLE attribute is allocated upon entry to a target region, the allocation status of the corresponding list item must not be changed and must not be reshaped in the region.
If an array section of an allocatable array is mapped and the size of the section is smaller than that of the whole array, the target region must not have any reference to the whole array.
A list item that is an array or an array section that has a type for which a user-defined mapper exists, is mapped as if the final map type is ALLOC, RELEASE, or DELETE. Then each element is mapped with the original map type, as if by a separate construct according to the user-defined mapper.
If a MAPPER map-type-modifier appears in the MAP clause, the type specified in the user-defined mapper must match the type of the list items in the MAP clause.