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

dev_omp

File:
1 edited

Legend:

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

    r1155 r1328  
    1414#include "grid_transformation_factory_impl.hpp" 
    1515 
    16  
     16#include "reduction.hpp" 
    1717 
    1818namespace xios { 
     
    6868 
    6969  } 
     70   
     71  // if(CReductionAlgorithm::ReductionOperations_ptr == 0)  
     72  //   CReductionAlgorithm::initReductionOperation(); 
    7073 
    71   if(CReductionAlgorithm::ReductionOperations_ptr == 0)  
    72     CReductionAlgorithm::initReductionOperation(); 
    73  
    74   if ((*CReductionAlgorithm::ReductionOperations_ptr).end() == (*CReductionAlgorithm::ReductionOperations_ptr).find(op)) 
     74  //if (CReductionAlgorithm::ReductionOperations.end() == CReductionAlgorithm::ReductionOperations.find(op)) 
     75  if (CReductionAlgorithm::ReductionOperations_ptr->end() == CReductionAlgorithm::ReductionOperations_ptr->find(op)) 
    7576    ERROR("CScalarAlgorithmReduceDomain::CScalarAlgorithmReduceDomain(CDomain* domainDestination, CDomain* domainSource, CReduceDomainToScalar* algo)", 
    7677       << "Operation '" << op << "' not found. Please make sure to use a supported one" 
     
    7879       << "Scalar destination " << scalarDestination->getId()); 
    7980 
    80   reduction_ = CReductionAlgorithm::createOperation((*CReductionAlgorithm::ReductionOperations_ptr)[op]); 
     81  //reduction_ = CReductionAlgorithm::createOperation(CReductionAlgorithm::ReductionOperations[op]); 
     82  reduction_ = CReductionAlgorithm::createOperation(CReductionAlgorithm::ReductionOperations_ptr->at(op)); 
    8183} 
    8284 
     
    8587                                         CArray<double,1>& dataOut, 
    8688                                         std::vector<bool>& flagInitial,                      
    87                                          bool ignoreMissingValue) 
     89                                         bool ignoreMissingValue, bool firstPass) 
    8890{ 
    89   reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue); 
     91  reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue, firstPass); 
    9092} 
    9193 
Note: See TracChangeset for help on using the changeset viewer.