Changes between Initial Version and Version 1 of CommonHelperFunctionsForDifferentParallelLanguage


Ignore:
Timestamp:
07/11/14 11:49:24 (12 years ago)
Author:
ziqing
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CommonHelperFunctionsForDifferentParallelLanguage

    v1 v1  
     1Collective operations are being used by several parallel language like MPI or openMP
     2{{{ 
     3// Operation for collective reductions or collective operations
     4typedef enum {
     5  NO_OP,    // no operation
     6  MAX,      // maxinum
     7  MIN,      // minimun
     8  SUM,      // sum
     9  PROD,     // product
     10  LAND,     // logical and
     11  BAND,     // bit-wise and
     12  LOR,      // logical or
     13  BOR,      // bit-wise or
     14  LXOR,     // logical exclusive or
     15  BXOR,     // bit-wise exclusive or
     16  MINLOC,   // min value and location
     17  MAXLOC,   // max value and location
     18  REPLACE   // replace ? TODO: Find definition for this operation
     19}$operation;
     20}}}
     21
     22An system function being responsible for doing the operation will be much helpful for implementing collective function like "MPI_Reduce()".
     23{{{
     24/* Unpacks the bundle type data and applays the specified operations on that data.
     25   For every binary operarions defined in &operation, data will be used as the left operand and
     26   buf will be used as right operand and input and ouput argument. The value of buf as an input
     27   argument will always be the result got from the very last operation. Finally buf is also an output argument.
     28*/
     29void $bundle_unpack_apply(void *data, void *buf, $operation op);
     30}}}