Ignore:
Timestamp:
06/13/18 16:48:53 (6 years ago)
Author:
oabramkina
Message:

Replacing Boost's unordered_map and shared_pointer by its STL counterparts.

Two notes for Curie:

  • one can see the content of unordered_map with ddt only if XIOS has been compiled with gnu
  • XIOS will not compile any more with pgi (all available versions use old STL which are not up to the c++11 norms)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/filter/spatial_transform_filter.cpp

    r1474 r1542  
    1111  { /* Nothing to do */ } 
    1212 
    13   std::pair<boost::shared_ptr<CSpatialTransformFilter>, boost::shared_ptr<CSpatialTransformFilter> > 
     13  std::pair<std::shared_ptr<CSpatialTransformFilter>, std::shared_ptr<CSpatialTransformFilter> > 
    1414  CSpatialTransformFilter::buildFilterGraph(CGarbageCollector& gc, CGrid* srcGrid, CGrid* destGrid, bool hasMissingValue, double missingValue) 
    1515  { 
    1616    if (!srcGrid || !destGrid) 
    17       ERROR("std::pair<boost::shared_ptr<CSpatialTransformFilter>, boost::shared_ptr<CSpatialTransformFilter> >" 
     17      ERROR("std::pair<std::shared_ptr<CSpatialTransformFilter>, std::shared_ptr<CSpatialTransformFilter> >" 
    1818            "buildFilterGraph(CGarbageCollector& gc, CGrid* srcGrid, CGrid* destGrid)", 
    1919            "Impossible to build the filter graph if either the source or the destination grid are null."); 
    2020 
    21     boost::shared_ptr<CSpatialTransformFilter> firstFilter, lastFilter; 
     21    std::shared_ptr<CSpatialTransformFilter> firstFilter, lastFilter; 
    2222    // Note that this loop goes from the last transformation to the first transformation 
    2323    do 
     
    3636      for (it=algoList.begin();it!=algoList.end();++it)  if (it->second.first == TRANS_TEMPORAL_SPLITTING) isSpatialTemporal=true ; 
    3737 
    38       boost::shared_ptr<CSpatialTransformFilter> filter ; 
    39       if( isSpatialTemporal) filter = boost::shared_ptr<CSpatialTransformFilter>(new CSpatialTemporalFilter(gc, engine, gridTransformation, defaultValue, inputCount)); 
    40       else filter = boost::shared_ptr<CSpatialTransformFilter>(new CSpatialTransformFilter(gc, engine, defaultValue, inputCount)); 
     38      std::shared_ptr<CSpatialTransformFilter> filter ; 
     39      if( isSpatialTemporal) filter = std::shared_ptr<CSpatialTransformFilter>(new CSpatialTemporalFilter(gc, engine, gridTransformation, defaultValue, inputCount)); 
     40      else filter = std::shared_ptr<CSpatialTransformFilter>(new CSpatialTransformFilter(gc, engine, defaultValue, inputCount)); 
    4141 
    4242       
     
    140140  } 
    141141 
    142   std::map<CGridTransformation*, boost::shared_ptr<CSpatialTransformFilterEngine> > CSpatialTransformFilterEngine::engines; 
     142  std::map<CGridTransformation*, std::shared_ptr<CSpatialTransformFilterEngine> > CSpatialTransformFilterEngine::engines; 
    143143 
    144144  CSpatialTransformFilterEngine* CSpatialTransformFilterEngine::get(CGridTransformation* gridTransformation) 
     
    148148            "Impossible to get the requested engine, the grid transformation is invalid."); 
    149149 
    150     std::map<CGridTransformation*, boost::shared_ptr<CSpatialTransformFilterEngine> >::iterator it = engines.find(gridTransformation); 
     150    std::map<CGridTransformation*, std::shared_ptr<CSpatialTransformFilterEngine> >::iterator it = engines.find(gridTransformation); 
    151151    if (it == engines.end()) 
    152152    { 
    153       boost::shared_ptr<CSpatialTransformFilterEngine> engine(new CSpatialTransformFilterEngine(gridTransformation)); 
     153      std::shared_ptr<CSpatialTransformFilterEngine> engine(new CSpatialTransformFilterEngine(gridTransformation)); 
    154154      it = engines.insert(std::make_pair(gridTransformation, engine)).first; 
    155155    } 
Note: See TracChangeset for help on using the changeset viewer.