Quantcast
Channel: Intel® Fortran Compiler
Viewing all articles
Browse latest Browse all 3270

MAP Clause

$
0
0

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)

map-type

Determines how a list item is initialized. Possible values are:

ALLOC

On entry to the device region, each new corresponding list item has an undefined initial value.

TO

On entry to the device region, each new corresponding list item is initialized with the value of the original list item.

FROM

On exit from the device region, the value of the corresponding list item is assigned to each original list item.

TOFROM

On entry to the device region, each new corresponding list item is initialized with the value of the original list item. On exit from the device region, the value of the corresponding list item is assigned to each original list item.

If a map-type is not specified, the default is TOFROM.

The map initialization and assignment are done as if by intrinsic assignment.

list

Is the name of one or more variables 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.

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.


Viewing all articles
Browse latest Browse all 3270

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>