J3/17-220 To: J3 From: Reinhold Bader Subject: mapping of coindices Date: 2017 October 12 References: N2137 Discussion: ~~~~~~~~~~~ The mapping of coarray coindices to the actual image holding the addressed object is a two step process: Step 1 is described in 5.4.7 para 6; it concerns itself with producing an image index from coindices given the cobounds. This step is needed because the coarray concept effectively implements a cartesian topology when corank > 1 and/or non-default cobound coarrays are used. Step 2 is described in 9.6 para 3; it describes which team the image index shall apply to. This allows the implementation to calculate the image index in the initial team where the addressed object is hosted. There seems to be agreement that in step 1 the cobounds to be used for evaluating an image index in a coindexed expression are always those of the executing image, and that this also applies in all contexts where teams play a role (for example, for an associating coarray of a CHANGE TEAM statement). This implies that * step 1 is completely independent of any team execution context, * implementations need image-local information only to establish the mapping, and * it is incumbent on the programmer to avoid the use of image-dependent mappings (the latter arise if image-dependent cobounds are used). However, it seems to me that the wording for this could be clearer than is currently the case, and also that some text in 9.6 is redundant. Edits are suggested to improve this situation. Edits to N2137: ~~~~~~~~~~~~~~~ In 5.4.7 Coarray, [45:30], replace "the image index" by "an image index" {at this point it is not yet clear for which team the image index applies} In 5.4.7 Coarray, [45:31], after "array element (9.5.3.2)" add ", with the cobounds on the executing image substituted for the array bounds." {clarify that cobounds play the role of the bounds in 9.5.3.2, and that local cobounds are used to establish the mapping} In 9.6 Image selectors, [139:25-27] delete redundant text "Taking account of the cobounds ... taking account of the bounds." In 9.6 Image selectors, [139:27+] add new "NOTE 9.16+ Section 5.7.4 defines how an image index value is obtained from the cosubscripts." {alternatively, the complete sentence in 5.4.7 [45:30-31] including the suggested edits could be moved to section 9.6. This would make the above NOTE unnecessary, at the cost of having no link to 9.6 in 5.4.7.}