Intel® Fortran Compiler 17.0 Developer Guide and Reference
OFFLOAD Compiler Directives: Enable a group of statements to execute on the target. These directives only apply to Intel® MIC Architecture.
!DIR$ OFFLOAD BEGIN clause[[,] clause...]
block
!DIR$ END OFFLOAD
clause |
See the description of all clauses 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 clauses 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.