Ignore:
Timestamp:
06/18/18 20:32:55 (2 years ago)
Author:
yushan
Message:

branch_openmp merged with trunk r1544

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_openmp/src/filter/spatial_transform_filter.cpp

    r1482 r1545  
    1313  { /* Nothing to do */ } 
    1414 
    15   std::pair<boost::shared_ptr<CSpatialTransformFilter>, boost::shared_ptr<CSpatialTransformFilter> > 
     15  std::pair<std::shared_ptr<CSpatialTransformFilter>, std::shared_ptr<CSpatialTransformFilter> > 
    1616  CSpatialTransformFilter::buildFilterGraph(CGarbageCollector& gc, CGrid* srcGrid, CGrid* destGrid, bool hasMissingValue, double missingValue) 
    1717  { 
    1818    if (!srcGrid || !destGrid) 
    19       ERROR("std::pair<boost::shared_ptr<CSpatialTransformFilter>, boost::shared_ptr<CSpatialTransformFilter> >" 
     19      ERROR("std::pair<std::shared_ptr<CSpatialTransformFilter>, std::shared_ptr<CSpatialTransformFilter> >" 
    2020            "buildFilterGraph(CGarbageCollector& gc, CGrid* srcGrid, CGrid* destGrid)", 
    2121            "Impossible to build the filter graph if either the source or the destination grid are null."); 
    2222 
    23     boost::shared_ptr<CSpatialTransformFilter> firstFilter, lastFilter; 
     23    std::shared_ptr<CSpatialTransformFilter> firstFilter, lastFilter; 
    2424    // Note that this loop goes from the last transformation to the first transformation 
    2525    do 
     
    3838      for (it=algoList.begin();it!=algoList.end();++it)  if (it->second.first == TRANS_TEMPORAL_SPLITTING) isSpatialTemporal=true ; 
    3939 
    40       boost::shared_ptr<CSpatialTransformFilter> filter ; 
    41       if( isSpatialTemporal) filter = boost::shared_ptr<CSpatialTransformFilter>(new CSpatialTemporalFilter(gc, engine, gridTransformation, defaultValue, inputCount)); 
    42       else filter = boost::shared_ptr<CSpatialTransformFilter>(new CSpatialTransformFilter(gc, engine, defaultValue, inputCount)); 
     40      std::shared_ptr<CSpatialTransformFilter> filter ; 
     41      if( isSpatialTemporal) filter = std::shared_ptr<CSpatialTransformFilter>(new CSpatialTemporalFilter(gc, engine, gridTransformation, defaultValue, inputCount)); 
     42      else filter = std::shared_ptr<CSpatialTransformFilter>(new CSpatialTransformFilter(gc, engine, defaultValue, inputCount)); 
    4343 
    4444       
     
    142142  } 
    143143 
    144   //std::map<CGridTransformation*, boost::shared_ptr<CSpatialTransformFilterEngine> > CSpatialTransformFilterEngine::engines; 
    145   std::map<CGridTransformation*, boost::shared_ptr<CSpatialTransformFilterEngine> > *CSpatialTransformFilterEngine::engines_ptr = 0; 
     144  std::map<CGridTransformation*, std::shared_ptr<CSpatialTransformFilterEngine> > *CSpatialTransformFilterEngine::engines_ptr = 0; 
    146145 
    147146  CSpatialTransformFilterEngine* CSpatialTransformFilterEngine::get(CGridTransformation* gridTransformation) 
     
    151150            "Impossible to get the requested engine, the grid transformation is invalid."); 
    152151     
    153     if(engines_ptr == NULL) engines_ptr = new std::map<CGridTransformation*, boost::shared_ptr<CSpatialTransformFilterEngine> >; 
    154  
    155     //std::map<CGridTransformation*, boost::shared_ptr<CSpatialTransformFilterEngine> >::iterator it = engines.find(gridTransformation); 
    156     std::map<CGridTransformation*, boost::shared_ptr<CSpatialTransformFilterEngine> >::iterator it = engines_ptr->find(gridTransformation); 
    157     //if (it == engines.end()) 
     152    if(engines_ptr == NULL) engines_ptr = new std::map<CGridTransformation*, std::shared_ptr<CSpatialTransformFilterEngine> >; 
     153 
     154 
     155    std::map<CGridTransformation*, std::shared_ptr<CSpatialTransformFilterEngine> >::iterator it = engines_ptr->find(gridTransformation); 
    158156    if (it == engines_ptr->end()) 
    159157    { 
    160       boost::shared_ptr<CSpatialTransformFilterEngine> engine(new CSpatialTransformFilterEngine(gridTransformation)); 
    161       //it = engines.insert(std::make_pair(gridTransformation, engine)).first; 
     158      std::shared_ptr<CSpatialTransformFilterEngine> engine(new CSpatialTransformFilterEngine(gridTransformation)); 
    162159      it = engines_ptr->insert(std::make_pair(gridTransformation, engine)).first; 
    163160    } 
Note: See TracChangeset for help on using the changeset viewer.