NUM_IMAGES takes optional arguments TEAM and TEAM_NUMBER.
This patch provides an interface for only the optional TEAM_NUMBER dummy argument. It is likely that a different function will be required to support TEAM arguments.
craig.rasmussen on Sep 9 2021, 2:52 PM.Authored by
Peter Klausler wrote:
I can revisit this when I add a TEAM type dummy (probably after you complete the type magic in the front end). For now this allows me to implement NUM_IMAGES for a single image. Possible function names: NumImages, NumImagesTeam NumImagesTeamNum.
As you say, the implementation can do whatever it wants.
From: Peter Klausler via Phabricator <firstname.lastname@example.org>
Comment at: flang/runtime/coarray.h:21
+ const char *sourceFile = nullptr, int sourceLine = 0);
Or you could have two entry points, one with a team number and one without, and avoid exposing this kind of trick in the API. It could still be used as a hidden part of a common implementation.
CHANGES SINCE LAST ACTION
Hopefully this will open the issue and is the correct way to correct a push that was reverted.
Note comment on line 97 of flang/include/flang/Evaluate/tools.h. This fixes link error for shared libraries.