void SMP_Reduce(void *data_in, void *data_out, int nitems,
int dtype, int opr, int node);
SUBROUTINE SMP_REDUCE(DATA_IN, DATA_OUT, NITEMS, DTYPE, OPR, NODE)
<type> DATA_IN(*), DATA_OUT(*)
INTEGER NITEMS, DTYPE, OPR, NODE
data_in - points to the input data set data_out - points to the output data set nitems - number of items in the data set dtype - data type for input/output data sets opr - reduction operator node - node to which data are reduced (-1 for all nodes)
<type> should match with the size specified by
dtype.Reduction operator (opr) is one of (with the supported data types):SMP_DT_INT1- integer*1 or charSMP_DT_INT2- integer*2 or shortSMP_DT_INT4- integer*4 or intSMP_DT_INT8- integer*8 or long (or long long)SMP_DT_REAL4- real*4 or floatSMP_DT_REAL8- real*8 or doubleSMP_DT_CMPLX8- complex*8 orstruct{float r, i;}SMP_DT_CMPLX16- complex*16 orstruct{double r, i;}
SMP_OPR_SUM- sum (all)SMP_OPR_PROD- product (all)SMP_OPR_MIN- minimum (INT*,REAL*)SMP_OPR_MAX- maximum (INT*,REAL*)SMP_OPR_LAND- logical and (INT*)SMP_OPR_BAND- bitwise and (INT*)SMP_OPR_LOR- logical or (INT*)SMP_OPR_BOR- bitwise or (INT*)SMP_OPR_LXOR- logical xor (INT*)SMP_OPR_BXOR- bitwise xor (INT*)
SMP_ERR_DTYPE, SMP_ERR_RDOPR,
SMP_ERR_MIXED