8.2.7 _gfortran_caf_send — Sending data from a local image to a remote image

Description:
Called to send a scalar, an array section or whole array from a local to a remote image identified by the image_index.
Syntax:
void _gfortran_caf_send (caf_token_t token, size_t offset, int image_index, gfc_descriptor_t *dest, caf_vector_t *dst_vector, gfc_descriptor_t *src, int dst_kind, int src_kind, bool may_require_tmp)
Arguments:
token intent(in) An opaque pointer identifying the coarray.
offset By which amount of bytes the actual data is shifted compared to the base address of the coarray.
image_index The ID of the remote image; must be a positive number.
dest intent(in) Array descriptor for the remote image for the bounds and the size. The base_addr shall not be accessed.
dst_vector intent(int) If not NULL, it contains the vector subscript of the destination array; the values are relative to the dimension triplet of the dest argument.
src intent(in) Array descriptor of the local array to be transferred to the remote image
dst_kind Kind of the destination argument
src_kind Kind of the source argument
may_require_tmp The variable is false 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.
NOTES
It is permitted to have image_id 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 assignment of a scalar to an array is permitted. In addition, the library has to handle numeric-type conversion and for strings, padding and different character kinds.

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