W3cubDocs

/GNU Fortran 7

8.2.15 _gfortran_caf_get_by_ref — Getting data from a remote image using enhanced references

Description:

Called to get a scalar, an array section or a whole array from a remote image identified by the image_index.

Syntax:

void _gfortran_caf_get_by_ref (caf_token_t token, int image_index, caf_reference_t *refs, gfc_descriptor_t *dst, int dst_kind, int src_kind, bool may_require_tmp, bool dst_reallocatable, int *stat)

Arguments:
token intent(in) An opaque pointer identifying the coarray.
image_index intent(in) The ID of the remote image; must be a positive number.
refs intent(in) The references to apply to the remote structure to get the data.
dst intent(in) Array descriptor of the local array to store the data transferred from the remote image. May be reallocated where needed and when DST_REALLOCATABLE allows it.
dst_kind intent(in) Kind of the destination argument
src_kind intent(in) Kind of the source argument
may_require_tmp intent(in) The variable is false when it is known at compile time that the dest and src either cannot overlap or overlap (fully or partially) such that walking src and dest in element wise element order (honoring the stride value) will not lead to wrong results. Otherwise, the value is true.
dst_reallocatable intent(in) Set when DST is of allocatable or pointer type and its refs allow reallocation, i.e., the full array or a component is referenced.
stat intent(out) When non-NULL give the result of the operation, i.e., zero on success and non-zero on error. When NULL and an error occurs, then an error message is printed and the program is terminated.
NOTES

It is permitted to have image_index equal the current image; the memory of the send-to and the send-from might (partially) overlap in that case. The implementation has to take care that it handles this case, e.g. using memmove which handles (partially) overlapping memory. If may_require_tmp is true, the library might additionally create a temporary variable, unless additional checks show that this is not required (e.g. because walking backward is possible or because both arrays are contiguous and memmove takes care of overlap issues).

Note that the library has to handle numeric-type conversion and for strings, padding and different character kinds.

Because of the more complicated references possible some operations may be unsupported by certain libraries. The library is expected to issue a precise error message why the operation is not permitted.

Next: , Previous: , Up: Function ABI Documentation [Contents][Index]

© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-7.1.0/gfortran/_005fgfortran_005fcaf_005fget_005fby_005fref.html