IMAGE_INDEX — Function that converts a cosubscript to an image index ¶RESULT = IMAGE_INDEX(COARRAY, SUB) |
RESULT = IMAGE_INDEX(COARRAY, SUB, TEAM) |
RESULT = IMAGE_INDEX(COARRAY, SUB, TEAM_NUMBER) |
Returns the image index belonging to a cosubscript.
Transformational function
| COARRAY | Coarray of any type. |
| SUB | default integer rank-1 array of a size equal to the corank of COARRAY. |
| TEAM | (optional, intent(in)) Scalar of type
TEAM_TYPE identifying the current or an ancestor team. If present,
the image index is that in the given team. |
| TEAM_NUMBER | (optional, intent(in)) Integer scalar
identifying the initial team (-1) or a sibling team of the current
team. TEAM and TEAM_NUMBER are mutually exclusive. |
Scalar default integer with the value of the image index that corresponds to the cosubscripts. For invalid cosubscripts the result is zero.
INTEGER :: array[2,-1:4,8,*] ! Writes 28 (or 0 if there are fewer than 28 images) WRITE (*,*) IMAGE_INDEX (array, [2,0,3,1])
Fortran 2008 and later. With TEAM or TEAM_NUMBER argument, Fortran 2018 and later.
THIS_IMAGE — Function that returns the cosubscript index of this image,
NUM_IMAGES — Function that returns the number of images