Changeset 1545 for XIOS/dev/branch_openmp/src/filter
- Timestamp:
- 06/18/18 20:32:55 (6 years ago)
- Location:
- XIOS/dev/branch_openmp/src/filter
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_openmp/src/filter/binary_arithmetic_filter.hpp
r642 r1545 5 5 #include <string> 6 6 #include "operator_expr.hpp" 7 #include <unordered_map> 7 8 8 9 namespace xios -
XIOS/dev/branch_openmp/src/filter/data_packet.hpp
r643 r1545 2 2 #define __XIOS_CDataPacket__ 3 3 4 #include < boost/shared_ptr.hpp>4 #include <memory> 5 5 6 6 #include "array_new.hpp" … … 43 43 }; // struct CDataPacket 44 44 45 typedef boost::shared_ptr<CDataPacket> CDataPacketPtr;46 typedef boost::shared_ptr<const CDataPacket> CConstDataPacketPtr;45 typedef std::shared_ptr<CDataPacket> CDataPacketPtr; 46 typedef std::shared_ptr<const CDataPacket> CConstDataPacketPtr; 47 47 } // namespace xios 48 48 -
XIOS/dev/branch_openmp/src/filter/output_pin.cpp
r1460 r1545 9 9 { /* Nothing to do */ } 10 10 11 void COutputPin::connectOutput( boost::shared_ptr<CInputPin> inputPin, size_t inputSlot)11 void COutputPin::connectOutput(std::shared_ptr<CInputPin> inputPin, size_t inputSlot) 12 12 { 13 13 if (!inputPin) … … 42 42 "The packet cannot be null."); 43 43 44 std::vector<std::pair< boost::shared_ptr<CInputPin>, size_t> >::iterator it, itEnd;44 std::vector<std::pair<std::shared_ptr<CInputPin>, size_t> >::iterator it, itEnd; 45 45 for (it = outputs.begin(), itEnd = outputs.end(); it != itEnd; ++it) 46 46 it->first->setInput(it->second, packet); … … 68 68 bool COutputPin::mustAutoTrigger() const 69 69 { 70 std::vector<std::pair< boost::shared_ptr<CInputPin>, size_t> >::const_iterator it, itEnd;70 std::vector<std::pair<std::shared_ptr<CInputPin>, size_t> >::const_iterator it, itEnd; 71 71 for (it = outputs.begin(), itEnd = outputs.end(); it != itEnd; ++it) 72 72 { … … 80 80 void COutputPin::setOutputTriggers() 81 81 { 82 std::vector<std::pair< boost::shared_ptr<CInputPin>, size_t> >::iterator it, itEnd;82 std::vector<std::pair<std::shared_ptr<CInputPin>, size_t> >::iterator it, itEnd; 83 83 for (it = outputs.begin(), itEnd = outputs.end(); it != itEnd; ++it) 84 84 it->first->setInputTrigger(it->second, this); … … 87 87 bool COutputPin::isDataExpected(const CDate& date) const 88 88 { 89 std::vector<std::pair< boost::shared_ptr<CInputPin>, size_t> >::const_iterator it, itEnd;89 std::vector<std::pair<std::shared_ptr<CInputPin>, size_t> >::const_iterator it, itEnd; 90 90 for (it = outputs.begin(), itEnd = outputs.end(); it != itEnd; ++it) 91 91 { -
XIOS/dev/branch_openmp/src/filter/output_pin.hpp
r1460 r1545 29 29 * \param inputSlot the input slot number 30 30 */ 31 void connectOutput( boost::shared_ptr<CInputPin> inputPin, size_t inputSlot);31 void connectOutput(std::shared_ptr<CInputPin> inputPin, size_t inputSlot); 32 32 33 33 /*! … … 93 93 94 94 //!< The list of connected filters and the corresponding slot numbers 95 std::vector<std::pair< boost::shared_ptr<CInputPin>, size_t> > outputs;95 std::vector<std::pair<std::shared_ptr<CInputPin>, size_t> > outputs; 96 96 97 97 //! Output buffer, store the packets until the output is triggered -
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 } -
XIOS/dev/branch_openmp/src/filter/spatial_transform_filter.hpp
r1460 r1545 36 36 * \return the first and the last filters of the filter graph 37 37 */ 38 static std::pair< boost::shared_ptr<CSpatialTransformFilter>, boost::shared_ptr<CSpatialTransformFilter> >38 static std::pair<std::shared_ptr<CSpatialTransformFilter>, std::shared_ptr<CSpatialTransformFilter> > 39 39 buildFilterGraph(CGarbageCollector& gc, CGrid* srcGrid, CGrid* destGrid, bool hasMissingValue, double defaultValue); 40 40 … … 141 141 142 142 //! The allocated engines 143 //static std::map<CGridTransformation*, boost::shared_ptr<CSpatialTransformFilterEngine> > engines; 144 static std::map<CGridTransformation*, boost::shared_ptr<CSpatialTransformFilterEngine> > *engines_ptr;143 144 static std::map<CGridTransformation*, std::shared_ptr<CSpatialTransformFilterEngine> > *engines_ptr; 145 145 #pragma omp threadprivate(engines_ptr) 146 146 }; // class CSpatialTransformFilterEngine -
XIOS/dev/branch_openmp/src/filter/temporal_filter.cpp
r1482 r1545 22 22 this->samplingOffset.second, this->samplingOffset.timestep) 23 23 , initDate(initDate) 24 , nextSamplingDate(initDate + (this->samplingOffset+ initDate.getRelCalendar().getTimeStep()))24 , nextSamplingDate(initDate + offsetMonth + ( offsetAllButMonth + initDate.getRelCalendar().getTimeStep())) 25 25 , nbOperationDates(1) 26 26 , nbSamplingDates(0)
Note: See TracChangeset
for help on using the changeset viewer.