インテル® Fortran コンパイラー XE 13.1 ユーザー・リファレンス・ガイド
OFFLOAD Compiler Directives: Cause a group of statements to be executed on the target. These directives only apply to Intel® MIC Architecture.
!DIR$ OFFLOAD BEGIN specifier[[,] specifier...]
block
!DIR$ END OFFLOAD
specifier |
See the description of all specifiers in OFFLOAD. |
block |
Is a structured block (section) of statements or constructs. You cannot branch into or out of the block. |
These directives provide the same functionality as the OFFLOAD directive, except that they let you offload a block of code that includes any number of Fortran statements, including DO, CALL and any assignments, but not OpenMP* directives.
The OFFLOAD BEGIN directive must be paired with a closing END OFFLOAD directive.
See OFFLOAD for complete details on specifiers and behavior.
In the following example, the DO loop is designated for offloading.
subroutine sample()
...
!DIR$ OFFLOAD BEGIN TARGET(MIC)
do i = 1, n
a(i) = b(i) ** 2.0
enddo
!DIR$ END OFFLOAD
...
end subroutine sample
See OFFLOAD for further examples.