Developer Guide and Reference

ID 767251
Date 10/31/2024
Public
Document Table of Contents

Reference Coarray Images

Data on other images is normally referenced by cosubscripts enclosed in square brackets.

For coarray images, each set of cosubscripts maps to an image index, which is an integer between one and the number of images, in the same way as a set of array subscripts maps to a position in array element order.

To find the image index for the invoking image on the current team, specify intrinsic function THIS_IMAGE() with no arguments.

To find the image index for the executing image on an ancestor team, specify intrinsic function THIS_IMAGE (team) where team is a team variable for an ancestor team.

To find the set of cosubscript indices for a coarray z that corresponds to the executing image on the current team, specify THIS_IMAGE(z).

To find the set of cosubscript indices for a coarray z that corresponds to the executing image on an ancestor team described by the team variable team_var, specify THIS_IMAGE(z, team_var).

To find the value of the cosubscript dim in the sequence of cosubscripts for the coarray z on the current team specify THIS_IMAGE (z, dim).

To find the cosubscript dim in the sequence of cosubscript values for a coarray z that would specify the executing image on an ancestor team described by the team variable team_var, specify THIS_IMAGE (z, dim,team_var).

To find the image index in the current team that corresponds to a set of cosubscript indices sub for a coarray z, specify intrinsic function IMAGE_INDEX(z, sub).

To find the image index on the ancestor team described by team_var that corresponds to a set of cosubscript indices sub for a coarray z, specify intrinsic function IMAGE_INDEX(z, sub, team_var).

To find the image index on the sibling team numbered 4 that corresponds to a set of cosubscript indices sub for a coarray z, specify intrinsic function IMAGE_INDEX(z, sub, 4).

To find the number of images, specify intrinsic function NUM_IMAGES.