| Version 3 (modified by , 12 years ago) ( diff ) |
|---|
Collective operations are being used by several parallel language like MPI or openMP
// Operation for collective reductions or collective operations
typedef enum {
NO_OP, // no operation
MAX, // maxinum
MIN, // minimun
SUM, // sum
PROD, // product
LAND, // logical and
BAND, // bit-wise and
LOR, // logical or
BOR, // bit-wise or
LXOR, // logical exclusive or
BXOR, // bit-wise exclusive or
MINLOC, // min value and location
MAXLOC, // max value and location
REPLACE // replace ? TODO: Find definition for this operation
}$operation;
An system function being responsible for doing the operation will be much helpful for implementing collective function like "MPI_Reduce()".
/* Unpacks the bundle type data and applays the specified operations on that data. For every binary operarions defined in &operation, data will be used as the left operand and buf will be used as right operand and input and ouput argument. The value of buf as an input argument will always be the result got from the very last operation. Finally buf is also an output argument. */ void $bundle_unpack_apply($bundle data, void *buf, int size, $operation op);
Note:
See TracWiki
for help on using the wiki.
