- Timestamp:
- 12/01/21 16:52:24 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/gatherer_connector.hpp
r2118 r2267 17 17 { 18 18 private: 19 CDistributedView*srcView_;20 CLocalView*dstView_;19 shared_ptr<CDistributedView> srcView_; 20 shared_ptr<CLocalView> dstView_; 21 21 map<int, vector<int>> connector_ ; 22 22 map<int, vector<bool>> mask_ ; // mask is on src view … … 25 25 26 26 public: 27 CGathererConnector( CDistributedView* srcView, CLocalView*dstView) : srcView_(srcView), dstView_(dstView) {} ;27 CGathererConnector(shared_ptr<CDistributedView> srcView, shared_ptr<CLocalView> dstView) : srcView_(srcView), dstView_(dstView) {} ; 28 28 void computeConnector(void) ; 29 29 … … 75 75 76 76 template<typename T> 77 void transfer(int rank, CGathererConnector** connectors, int nConnectors, const T* input, T* output)77 void transfer(int rank, shared_ptr<CGathererConnector>* connectors, int nConnectors, const T* input, T* output) 78 78 { 79 79 auto& connector = connector_[rank] ; // probably costly, find a better way to avoid the map … … 111 111 112 112 // hook for transfering mask in grid connector, maybe find an other way to doing that... 113 void transfer_or(int rank, CGathererConnector** connectors, int nConnectors, const bool* input, bool* output)113 void transfer_or(int rank, shared_ptr<CGathererConnector>* connectors, int nConnectors, const bool* input, bool* output) 114 114 { 115 115 auto& connector = connector_[rank] ; // probably costly, find a better way to avoid the map … … 210 210 } 211 211 212 int getSrcSliceSize(int rank, CGathererConnector** connectors, int nConnectors)212 int getSrcSliceSize(int rank, shared_ptr<CGathererConnector>* connectors, int nConnectors) 213 213 { if (nConnectors==0) return srcSize_[rank] ; else return srcSize_[rank] * (*(connectors-1))->getSrcSliceSize(rank, connectors-1,nConnectors-1) ; } 214 214 215 int getDstSliceSize( CGathererConnector** connectors, int nConnectors)215 int getDstSliceSize(shared_ptr<CGathererConnector>* connectors, int nConnectors) 216 216 { if (nConnectors==0) return dstSize_ ; else return dstSize_ * (*(connectors-1))->getDstSliceSize(connectors-1,nConnectors-1) ; } 217 217
Note: See TracChangeset
for help on using the changeset viewer.