- Timestamp:
- 06/06/17 15:52:13 (7 years ago)
- Location:
- XIOS/dev/branch_yushan_merged/src/transformation/Functions
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_yushan_merged/src/transformation/Functions/average_reduction.cpp
r1076 r1156 39 39 int nbLocalIndex = localIndex.size(); 40 40 int currentlocalIndex = 0; 41 double currentWeight = 0.0; 42 43 dataOut=std::numeric_limits<double>::quiet_NaN(); 41 double currentWeight = 0.0; 44 42 45 43 for (int idx = 0; idx < nbLocalIndex; ++idx) … … 59 57 weights_(currentlocalIndex) += 1.0; 60 58 } 59 } 60 else 61 { 62 if (flagInitial[currentlocalIndex]) 63 dataOut(currentlocalIndex) = std::numeric_limits<double>::quiet_NaN(); 61 64 } 62 65 } -
XIOS/dev/branch_yushan_merged/src/transformation/Functions/max_reduction.cpp
r1076 r1156 36 36 { 37 37 int nbLocalIndex = localIndex.size(); 38 int currentlocalIndex = 0; 39 dataOut=std::numeric_limits<double>::quiet_NaN(); 38 int currentlocalIndex = 0; 40 39 for (int idx = 0; idx < nbLocalIndex; ++idx) 41 40 { … … 52 51 dataOut(currentlocalIndex) = std::max(*(dataInput + idx), dataOut(currentlocalIndex)); 53 52 } 53 } 54 else 55 { 56 if (flagInitial[currentlocalIndex]) 57 dataOut(currentlocalIndex) = std::numeric_limits<double>::quiet_NaN(); 54 58 } 55 59 } -
XIOS/dev/branch_yushan_merged/src/transformation/Functions/min_reduction.cpp
r1076 r1156 36 36 { 37 37 int nbLocalIndex = localIndex.size(); 38 int currentlocalIndex = 0; 39 dataOut=std::numeric_limits<double>::quiet_NaN(); 38 int currentlocalIndex = 0; 40 39 for (int idx = 0; idx < nbLocalIndex; ++idx) 41 40 { … … 52 51 dataOut(currentlocalIndex) = std::min(*(dataInput + idx), dataOut(currentlocalIndex)); 53 52 } 53 } 54 else 55 { 56 if (flagInitial[currentlocalIndex]) 57 dataOut(currentlocalIndex) = std::numeric_limits<double>::quiet_NaN(); 54 58 } 55 59 } -
XIOS/dev/branch_yushan_merged/src/transformation/Functions/sum_reduction.cpp
r1076 r1156 36 36 { 37 37 int nbLocalIndex = localIndex.size(); 38 int currentlocalIndex = 0; 39 40 dataOut=std::numeric_limits<double>::quiet_NaN(); 38 int currentlocalIndex = 0; 41 39 42 40 for (int idx = 0; idx < nbLocalIndex; ++idx) … … 54 52 dataOut(currentlocalIndex) += *(dataInput + idx); 55 53 } 54 } 55 else 56 { 57 if (flagInitial[currentlocalIndex]) 58 dataOut(currentlocalIndex) = std::numeric_limits<double>::quiet_NaN(); 56 59 } 57 60 }
Note: See TracChangeset
for help on using the changeset viewer.