Next: _gfortran_caf_co_reduce, Previous: _gfortran_caf_co_min, Up: Function ABI Documentation [Contents][Index]
_gfortran_caf_co_sum
— Collective summing reductionCalculates the for the each array element of the variable a the sum value 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.
void _gfortran_caf_co_sum (gfc_descriptor_t *a, int result_image,
int *stat, char *errmsg, int errmsg_len)
a | intent(inout) And array descriptor with the data to be breoadcasted (on source_image) or to be received (other images). |
result_image | 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 | the buffer size of errmsg. |
If result_image is nonzero, the value on all images except of the specified one become undefined; hence, the library may make use of this.