- Timestamp:
- 06/18/18 20:32:55 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_openmp/src/filter/spatial_transform_filter.cpp
r1482 r1545 13 13 { /* Nothing to do */ } 14 14 15 std::pair< boost::shared_ptr<CSpatialTransformFilter>, boost::shared_ptr<CSpatialTransformFilter> >15 std::pair<std::shared_ptr<CSpatialTransformFilter>, std::shared_ptr<CSpatialTransformFilter> > 16 16 CSpatialTransformFilter::buildFilterGraph(CGarbageCollector& gc, CGrid* srcGrid, CGrid* destGrid, bool hasMissingValue, double missingValue) 17 17 { 18 18 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> >" 20 20 "buildFilterGraph(CGarbageCollector& gc, CGrid* srcGrid, CGrid* destGrid)", 21 21 "Impossible to build the filter graph if either the source or the destination grid are null."); 22 22 23 boost::shared_ptr<CSpatialTransformFilter> firstFilter, lastFilter;23 std::shared_ptr<CSpatialTransformFilter> firstFilter, lastFilter; 24 24 // Note that this loop goes from the last transformation to the first transformation 25 25 do … … 38 38 for (it=algoList.begin();it!=algoList.end();++it) if (it->second.first == TRANS_TEMPORAL_SPLITTING) isSpatialTemporal=true ; 39 39 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)); 43 43 44 44 … … 142 142 } 143 143 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; 146 145 147 146 CSpatialTransformFilterEngine* CSpatialTransformFilterEngine::get(CGridTransformation* gridTransformation) … … 151 150 "Impossible to get the requested engine, the grid transformation is invalid."); 152 151 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); 158 156 if (it == engines_ptr->end()) 159 157 { 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)); 162 159 it = engines_ptr->insert(std::make_pair(gridTransformation, engine)).first; 163 160 }
Note: See TracChangeset
for help on using the changeset viewer.