インテル® Fortran コンパイラー 19.1 デベロッパー・ガイドおよびリファレンス
An image selector determines the image index for a coindexed object. It takes the following form:
lbracket cosubscript-list [ , STAT=stat-var ] rbracket
lbracket |
Is a left bracket "[". This is required. |
cosubscript |
Is a scalar integer expression. Its value must be within the cobounds for its codimension. The number of cosubscripts must be equal to the corank of the object. If the lower bound is not specified, it is assumed to be 1. |
stat-var |
(Optional) Is a scalar integer variable with an exponent range of at least 4 (KIND=2 or greater). stat-var cannot be coindexed. |
rbracket |
Is a right bracket "]". This is required. |
Considering the cobounds and bounds, respectively, the cosubscript list in an image selector determines the image index in the same way that a subscript list in an array element determines the subscript order value.
An image selector must specify an image index value that is not greater than the number of images.
When a statement containing an image selector with STAT= specified is executed, stat-var becomes defined with value STAT_FAILED_IMAGE defined in the intrinsic module ISO_FORTRAN_ENV if the object referenced by the image selector is on a failed image. Otherwise, stat-var becomes defined with the value zero.
A stat-var in an image selector cannot depend on the evaluation of any other entity in the same statement. An expression cannot depend on the value of any stat-var that is specified in the same statement. The value of stat-var cannot depend on execution of any part of the statement, other than if the object is on a failed image.
Assume that there are 16 images and the coarray C is declared as follows:
REAL :: C(15)[5,*]
C(:)[1,4] is valid because it selects image 16, but C(:)[2,4] is invalid because it selects image 17.
C(1)[2, 1, STAT=istatus] will cause istatus to become defined with the value STAT_FAILED_IMAGE if image 6 has failed; otherwise, istatus becomes defined with the value zero.