Ignore:
Timestamp:
10/24/16 16:16:31 (8 years ago)
Author:
mhnguyen
Message:

Implementing AVERAGE operation

+) Add average operation for reduction transformation

Test
+) On Curie
+) Correct

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/transformation/Functions/reduction.hpp

    r888 r979  
    4040    \param [in] dataInput Pointer to the first element of data input array (in form of buffer) 
    4141    \param [in/out] dataOut Array contains local data 
    42     \param [in/out] flagInitial vector of boolean to mark the local index already initialized. True means there is a need for initalization 
     42    \param [in/out] flagInitial vector of boolean to mark the local index already initialized. True means there is a need for initialization 
    4343  */ 
    4444  virtual void apply(const std::vector<std::pair<int,double> >& localIndex, 
     
    4646                     CArray<double,1>& dataOut, 
    4747                     std::vector<bool>& flagInitial) = 0; 
     48  /*! 
     49    Update local data  
     50    In some case (e.g average) we need global information (e.g weights) then update data with this information 
     51    \param [in] dataOut local data output 
     52  */ 
     53  virtual void updateData(CArray<double,1>& dataOut) {} 
    4854 
    4955  virtual ~CReductionAlgorithm() {} 
Note: See TracChangeset for help on using the changeset viewer.