Ignore:
Timestamp:
11/15/17 12:14:34 (3 years ago)
Author:
yushan
Message:

dev_omp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_openmp/src/transformation/Functions/average_reduction.cpp

    r1205 r1328  
    3131                                       CArray<double,1>& dataOut, 
    3232                                       std::vector<bool>& flagInitial,                      
    33                                        bool ignoreMissingValue) 
     33                                       bool ignoreMissingValue, bool firstPass) 
    3434{ 
    3535  if (resetWeight_) { weights_.resize(flagInitial.size()); weights_ = 1.0; resetWeight_ = false; }   
     
    3939    int nbLocalIndex = localIndex.size(); 
    4040    int currentlocalIndex = 0; 
    41     double currentWeight  = 0.0;     
     41    double currentWeight  = 0.0; 
     42 
     43    if (firstPass) dataOut=std::numeric_limits<double>::quiet_NaN(); 
    4244 
    4345    for (int idx = 0; idx < nbLocalIndex; ++idx) 
     
    5759          weights_(currentlocalIndex) += 1.0; 
    5860        } 
    59       } 
    60       else 
    61       { 
    62         if (flagInitial[currentlocalIndex])  
    63           dataOut(currentlocalIndex) = std::numeric_limits<double>::quiet_NaN(); 
    6461      } 
    6562    } 
Note: See TracChangeset for help on using the changeset viewer.