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

dev_omp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_openmp/src/transformation/Functions/sum_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 (ignoreMissingValue) 
    3636  { 
    3737    int nbLocalIndex = localIndex.size(); 
    38     int currentlocalIndex = 0;     
     38    int currentlocalIndex = 0; 
     39 
     40    if (firstPass) dataOut=std::numeric_limits<double>::quiet_NaN(); 
    3941   
    4042    for (int idx = 0; idx < nbLocalIndex; ++idx) 
     
    5254          dataOut(currentlocalIndex) += *(dataInput + idx); 
    5355        } 
    54       } 
    55       else 
    56       { 
    57         if (flagInitial[currentlocalIndex])  
    58           dataOut(currentlocalIndex) = std::numeric_limits<double>::quiet_NaN(); 
    5956      } 
    6057    }     
Note: See TracChangeset for help on using the changeset viewer.