Called to send a scalar, an array section or a whole array from a remote image identified by the src_image_index to a remote image identified by the dst_image_index.
void _gfortran_caf_sendget_by_ref (caf_token_t dst_token,
int dst_image_index, caf_reference_t *dst_refs,
caf_token_t src_token, int src_image_index, caf_reference_t *src_refs,
int dst_kind, int src_kind, bool may_require_tmp, int *dst_stat,
int *src_stat, int dst_type, int src_type)
|dst_token||intent(in) An opaque pointer identifying the destination coarray.|
|dst_image_index||intent(in) The ID of the destination remote image; must be a positive number.|
|dst_refs||intent(in) The references on the remote array to store the data given by the source. Guaranteed to have at least one entry.|
|src_token||intent(in) An opaque pointer identifying the source coarray.|
|src_image_index||intent(in) The ID of the source remote image; must be a positive number.|
|src_refs||intent(in) The references to apply to the remote structure to get the data.|
|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
|dst_stat||intent(out) when non-
|src_stat||intent(out) When non-
|dst_type||intent(in) Give the type of the destination. When the destination is not an array, than the precise type, e.g. of a component in a derived type, is not known, but provided here.|
|src_type||intent(in) Give the type of the source. When the source is not an array, than the precise type, e.g. of a component in a derived type, is not known, but provided here.|
It is permitted to have the same image index for both src_image_index and dst_image_index; 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.
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.
© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.