Changeset 1542 for XIOS/trunk/src/transformation
- Timestamp:
- 06/13/18 16:48:53 (6 years ago)
- Location:
- XIOS/trunk/src/transformation
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/transformation/axis_algorithm_inverse.cpp
r936 r1542 108 108 } 109 109 110 typedef boost::unordered_map<size_t, std::vector<double> > GlobalIndexMapFromSrcToDest;110 typedef std::unordered_map<size_t, std::vector<double> > GlobalIndexMapFromSrcToDest; 111 111 GlobalIndexMapFromSrcToDest globalIndexMapFromSrcToDest; 112 112 TransformationIndexMap& transMap = this->transformationMapping_[0]; … … 126 126 dhtIndexProcRank.computeIndexInfoMapping(globalSrcIndex); 127 127 CClientClientDHTInt::Index2VectorInfoTypeMap& computedGlobalIndexOnProc = dhtIndexProcRank.getInfoIndexMap(); 128 boost::unordered_map<int, std::vector<size_t> > globalSrcIndexSendToProc;128 std::unordered_map<int, std::vector<size_t> > globalSrcIndexSendToProc; 129 129 for (int idx = 0; idx < localIndex; ++idx) 130 130 { … … 137 137 } 138 138 139 boost::unordered_map<int, std::vector<size_t> >::const_iterator itbIndex = globalSrcIndexSendToProc.begin(), itIndex,139 std::unordered_map<int, std::vector<size_t> >::const_iterator itbIndex = globalSrcIndexSendToProc.begin(), itIndex, 140 140 iteIndex = globalSrcIndexSendToProc.end(); 141 141 std::map<int,int> sendRankSizeMap,recvRankSizeMap; … … 175 175 std::vector<MPI_Request> requests; 176 176 std::vector<MPI_Status> status; 177 boost::unordered_map<int, unsigned long* > recvGlobalIndexSrc;178 boost::unordered_map<int, double* > sendValueToDest;177 std::unordered_map<int, unsigned long* > recvGlobalIndexSrc; 178 std::unordered_map<int, double* > sendValueToDest; 179 179 for (std::map<int,int>::const_iterator itRecv = recvRankSizeMap.begin(); itRecv != recvRankSizeMap.end(); ++itRecv) 180 180 { … … 188 188 } 189 189 190 boost::unordered_map<int, unsigned long* > sendGlobalIndexSrc;191 boost::unordered_map<int, double* > recvValueFromSrc;190 std::unordered_map<int, unsigned long* > sendGlobalIndexSrc; 191 std::unordered_map<int, double* > recvValueFromSrc; 192 192 for (itIndex = itbIndex; itIndex != iteIndex; ++itIndex) 193 193 { … … 271 271 delete [] recvSizeBuff; 272 272 273 boost::unordered_map<int, double* >::const_iterator itChar;273 std::unordered_map<int, double* >::const_iterator itChar; 274 274 for (itChar = sendValueToDest.begin(); itChar != sendValueToDest.end(); ++itChar) 275 275 delete [] itChar->second; 276 276 for (itChar = recvValueFromSrc.begin(); itChar != recvValueFromSrc.end(); ++itChar) 277 277 delete [] itChar->second; 278 boost::unordered_map<int, unsigned long* >::const_iterator itLong;278 std::unordered_map<int, unsigned long* >::const_iterator itLong; 279 279 for (itLong = sendGlobalIndexSrc.begin(); itLong != sendGlobalIndexSrc.end(); ++itLong) 280 280 delete [] itLong->second; -
XIOS/trunk/src/transformation/domain_algorithm_interpolate.cpp
r1480 r1542 8 8 */ 9 9 #include "domain_algorithm_interpolate.hpp" 10 #include < boost/unordered_map.hpp>10 #include <unordered_map> 11 11 #include "context.hpp" 12 12 #include "context_client.hpp" … … 536 536 TransformationWeightMap& transWeight = this->transformationWeight_[0]; 537 537 538 boost::unordered_map<size_t,int> globalIndexOfDomainDest;538 std::unordered_map<size_t,int> globalIndexOfDomainDest; 539 539 int ni = domainDest_->ni.getValue(); 540 540 int nj = domainDest_->nj.getValue(); -
XIOS/trunk/src/transformation/generic_algorithm_transformation.cpp
r1480 r1542 165 165 int nbClient = client->clientSize; 166 166 167 typedef boost::unordered_map<int, std::vector<std::pair<int,double> > > SrcToDstMap;167 typedef std::unordered_map<int, std::vector<std::pair<int,double> > > SrcToDstMap; 168 168 int idx; 169 169 … … 287 287 if (idx != elementPositionInGrid) 288 288 { 289 boost::unordered_map<int,std::vector<size_t> >::iterator itb = globalElementIndexOnProc_[idx].begin(), it,289 std::unordered_map<int,std::vector<size_t> >::iterator itb = globalElementIndexOnProc_[idx].begin(), it, 290 290 ite = globalElementIndexOnProc_[idx].end(); 291 291 for (it = itb; it != ite; ++it) it->second.resize(1); … … 301 301 if (idx != elementPositionInGrid) 302 302 { 303 boost::unordered_map<int,std::vector<size_t> >::iterator itb = globalElementIndexOnProc_[idx].begin(), it,303 std::unordered_map<int,std::vector<size_t> >::iterator itb = globalElementIndexOnProc_[idx].begin(), it, 304 304 ite = globalElementIndexOnProc_[idx].end(); 305 305 for (it = itb; it != ite; ++it) procOfNonTransformedElements_.insert(it->first); … … 359 359 set<int> tmpSet ; 360 360 procList.swap(tmpSet) ; 361 boost::unordered_map<int,std::vector<size_t> >::iterator itb = globalElementIndexOnProc_[idx].begin(), it,361 std::unordered_map<int,std::vector<size_t> >::iterator itb = globalElementIndexOnProc_[idx].begin(), it, 362 362 ite = globalElementIndexOnProc_[idx].end(); 363 363 for (it = itb; it != ite; ++it) … … 395 395 396 396 // Build mapping between global source element index and global destination element index. 397 boost::unordered_map<int,std::vector<size_t> >().swap(globalElementIndexOnProc_[elementPositionInGrid]);397 std::unordered_map<int,std::vector<size_t> >().swap(globalElementIndexOnProc_[elementPositionInGrid]); 398 398 std::set<int> tmpCounter; 399 399 itTransWeight = itbTransWeight; … … 426 426 if (idx != elementPositionInGrid) 427 427 { 428 boost::unordered_map<int,std::vector<size_t> >::iterator itb = globalElementIndexOnProc_[idx].begin(), it,428 std::unordered_map<int,std::vector<size_t> >::iterator itb = globalElementIndexOnProc_[idx].begin(), it, 429 429 ite = globalElementIndexOnProc_[idx].end(); 430 430 for (it = itb; it != ite; ++it) it->second[0] = transPos(idxTrans); … … 456 456 void CGenericAlgorithmTransformation::computeGlobalGridIndexMapping(int elementPositionInGrid, 457 457 const std::vector<int>& srcRank, 458 boost::unordered_map<int, std::vector<std::pair<int,double> > >& src2DstMap,458 std::unordered_map<int, std::vector<std::pair<int,double> > >& src2DstMap, 459 459 CGrid* gridSrc, 460 460 CGrid* gridDst, 461 std::vector< boost::unordered_map<int,std::vector<size_t> > >& globalElementIndexOnProc,461 std::vector<std::unordered_map<int,std::vector<size_t> > >& globalElementIndexOnProc, 462 462 SourceDestinationIndexMap& globaIndexWeightFromSrcToDst) 463 463 { … … 615 615 616 616 SourceDestinationIndexMap::iterator rankIt,rankIte ; 617 boost::unordered_map<size_t, std::vector<std::pair<size_t,double> > >::iterator globalSrcIndexIt, globalSrcIndexIte ;617 std::unordered_map<size_t, std::vector<std::pair<size_t,double> > >::iterator globalSrcIndexIt, globalSrcIndexIte ; 618 618 std::vector<std::pair<size_t,double> >::iterator vectIt,vectIte ; 619 619 … … 653 653 CScalar* scalarSrc, 654 654 CArray<size_t,1>& destGlobalIndexPositionInGrid, 655 boost::unordered_map<int,std::vector<size_t> >& globalScalarIndexOnProc)655 std::unordered_map<int,std::vector<size_t> >& globalScalarIndexOnProc) 656 656 { 657 657 CContext* context = CContext::getCurrent(); … … 677 677 CAxis* axisSrc, 678 678 CArray<size_t,1>& destGlobalIndexPositionInGrid, 679 boost::unordered_map<int,std::vector<size_t> >& globalAxisIndexOnProc)679 std::unordered_map<int,std::vector<size_t> >& globalAxisIndexOnProc) 680 680 { 681 681 CContext* context = CContext::getCurrent(); … … 746 746 CDomain* domainSrc, 747 747 CArray<size_t,1>& destGlobalIndexPositionInGrid, 748 boost::unordered_map<int,std::vector<size_t> >& globalDomainIndexOnProc)748 std::unordered_map<int,std::vector<size_t> >& globalDomainIndexOnProc) 749 749 { 750 750 CContext* context = CContext::getCurrent(); -
XIOS/trunk/src/transformation/generic_algorithm_transformation.hpp
r1420 r1542 38 38 public: 39 39 // Mapping between global index map of DESTINATION and its local index with pair of global index of SOURCE and weights 40 typedef boost::unordered_map<int, boost::unordered_map<size_t, std::vector<std::pair<size_t,double> > > > SourceDestinationIndexMap;40 typedef std::unordered_map<int, std::unordered_map<size_t, std::vector<std::pair<size_t,double> > > > SourceDestinationIndexMap; 41 41 42 42 protected: 43 typedef boost::unordered_map<size_t,int> GlobalLocalMap;43 typedef std::unordered_map<size_t,int> GlobalLocalMap; 44 44 protected: 45 typedef boost::unordered_map<int, std::vector<int> > TransformationIndexMap;46 typedef boost::unordered_map<int, std::vector<double> > TransformationWeightMap;47 typedef boost::unordered_map<int, std::vector<int> > TransformationPositionMap;45 typedef std::unordered_map<int, std::vector<int> > TransformationIndexMap; 46 typedef std::unordered_map<int, std::vector<double> > TransformationWeightMap; 47 typedef std::unordered_map<int, std::vector<int> > TransformationPositionMap; 48 48 49 49 public: … … 108 108 void computeGlobalGridIndexMapping(int elementPositionInGrid, 109 109 const std::vector<int>& srcRank, 110 boost::unordered_map<int, std::vector<std::pair<int,double> > >& src2DstMap,110 std::unordered_map<int, std::vector<std::pair<int,double> > >& src2DstMap, 111 111 CGrid* gridDst, 112 112 CGrid* gridSrc, 113 std::vector< boost::unordered_map<int,std::vector<size_t> > >& globalElementIndexOnProc,113 std::vector<std::unordered_map<int,std::vector<size_t> > >& globalElementIndexOnProc, 114 114 SourceDestinationIndexMap& globaIndexWeightFromSrcToDst); 115 115 … … 117 117 CDomain* domainSrc, 118 118 CArray<size_t,1>& destGlobalIndexPositionInGrid, 119 boost::unordered_map<int,std::vector<size_t> >& globalDomainIndexOnProc);119 std::unordered_map<int,std::vector<size_t> >& globalDomainIndexOnProc); 120 120 121 121 void computeExchangeAxisIndex(CAxis* axisDst, 122 122 CAxis* axisSrc, 123 123 CArray<size_t,1>& destGlobalIndexPositionInGrid, 124 boost::unordered_map<int,std::vector<size_t> >& globalAxisIndexOnProc);124 std::unordered_map<int,std::vector<size_t> >& globalAxisIndexOnProc); 125 125 126 126 void computeExchangeScalarIndex(CScalar* scalarDst, 127 127 CScalar* scalarSrc, 128 128 CArray<size_t,1>& destGlobalIndexPositionInGrid, 129 boost::unordered_map<int,std::vector<size_t> >& globalScalarIndexOnProc);129 std::unordered_map<int,std::vector<size_t> >& globalScalarIndexOnProc); 130 130 131 131 void computePositionElements(CGrid* dst, CGrid* src); … … 151 151 std::set<StdSize> indexElementSrc_; 152 152 153 std::vector< boost::unordered_map<int,std::vector<size_t> > > globalElementIndexOnProc_;153 std::vector<std::unordered_map<int,std::vector<size_t> > > globalElementIndexOnProc_; 154 154 155 155 std::vector<int> procContainSrcElementIdx_; // List of processes containing source index of transformed elements -
XIOS/trunk/src/transformation/grid_transformation.cpp
r1412 r1542 15 15 #include "mpi_tag.hpp" 16 16 #include "grid.hpp" 17 #include < boost/unordered_map.hpp>17 #include <unordered_map> 18 18 #include "timer.hpp" 19 19 … … 479 479 SourceDestinationIndexMap::const_iterator itbIndex = globaIndexWeightFromSrcToDst.begin(), 480 480 iteIndex = globaIndexWeightFromSrcToDst.end(), itIndex; 481 typedef boost::unordered_map<size_t, std::vector<std::pair<size_t,double> > > SendIndexMap;481 typedef std::unordered_map<size_t, std::vector<std::pair<size_t,double> > > SendIndexMap; 482 482 std::map<int,int> sendRankSizeMap,recvRankSizeMap; 483 483 int connectedClient = globaIndexWeightFromSrcToDst.size(); … … 522 522 std::vector<MPI_Request> requests; 523 523 std::vector<MPI_Status> status; 524 boost::unordered_map<int, unsigned char* > recvMaskDst;525 boost::unordered_map<int, unsigned long* > recvGlobalIndexSrc;524 std::unordered_map<int, unsigned char* > recvMaskDst; 525 std::unordered_map<int, unsigned long* > recvGlobalIndexSrc; 526 526 for (std::map<int,int>::const_iterator itRecv = recvRankSizeMap.begin(); itRecv != recvRankSizeMap.end(); ++itRecv) 527 527 { … … 537 537 } 538 538 539 boost::unordered_map<int, CArray<size_t,1> > globalIndexDst;540 boost::unordered_map<int, CArray<double,1> > weightDst;541 boost::unordered_map<int, unsigned char* > sendMaskDst;542 boost::unordered_map<int, unsigned long* > sendGlobalIndexSrc;539 std::unordered_map<int, CArray<size_t,1> > globalIndexDst; 540 std::unordered_map<int, CArray<double,1> > weightDst; 541 std::unordered_map<int, unsigned char* > sendMaskDst; 542 std::unordered_map<int, unsigned long* > sendGlobalIndexSrc; 543 543 for (itIndex = itbIndex; itIndex != iteIndex; ++itIndex) 544 544 { … … 670 670 delete [] recvSizeBuff; 671 671 672 boost::unordered_map<int, unsigned char* >::const_iterator itChar;672 std::unordered_map<int, unsigned char* >::const_iterator itChar; 673 673 for (itChar = sendMaskDst.begin(); itChar != sendMaskDst.end(); ++itChar) 674 674 delete [] itChar->second; 675 675 for (itChar = recvMaskDst.begin(); itChar != recvMaskDst.end(); ++itChar) 676 676 delete [] itChar->second; 677 boost::unordered_map<int, unsigned long* >::const_iterator itLong;677 std::unordered_map<int, unsigned long* >::const_iterator itLong; 678 678 for (itLong = sendGlobalIndexSrc.begin(); itLong != sendGlobalIndexSrc.end(); ++itLong) 679 679 delete [] itLong->second;
Note: See TracChangeset
for help on using the changeset viewer.