W3cubDocs

/GNU Fortran 7

8.2.35 _gfortran_caf_co_sum — Collective summing reduction

Description:

Calculates for each array element of the variable a the sum of all values for that element in the current team; if result_image has the value 0, the result shall be stored on all images, otherwise, only on the specified image. This function operates on numeric values only.

Syntax:

void _gfortran_caf_co_sum (gfc_descriptor_t *a, int result_image, int *stat, char *errmsg, int errmsg_len)

Arguments:
a intent(inout) An array descriptor with the data to be processed. On the destination image(s) the result overwrites the old content.
result_image intent(in) The ID of the image to which the reduced value should be copied to; if zero, it has to be copied to all images.
stat intent(out) Stores the status STAT= and may be NULL.
errmsg intent(out) When an error occurs, this will be set to an error message; may be NULL.
errmsg_len intent(in) the buffer size of errmsg
NOTES

If result_image is nonzero, the data in the array descriptor a on all images except of the specified one become undefined; hence, the library may make use of this.

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