Changeset 843 for XIOS/trunk/src/transformation
- Timestamp:
- 04/26/16 16:04:04 (8 years ago)
- Location:
- XIOS/trunk/src/transformation
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/transformation/generic_algorithm_transformation.cpp
r841 r843 83 83 { 84 84 size_t srcGridSize = globalIndexSrcGrid[idx].size(); 85 // globaIndexWeightFromDestToSource[(it->first)].reserve(srcGridSize); 86 globaIndexWeightFromDestToSource[(it->first)].resize(srcGridSize); 85 // globaIndexWeightFromDestToSource[(it->first)].resize(srcGridSize); 86 DestinationGlobalIndex& tmp = globaIndexWeightFromDestToSource[(it->first)]; 87 tmp.resize(srcGridSize); 87 88 for (int i = 0; i < srcGridSize; ++i) 88 89 { 89 globaIndexWeightFromDestToSource[(it->first)][i] = (make_pair(it->second, make_pair(globalIndexSrcGrid[idx][i], currentVecWeight[i]))); 90 tmp[i].first = it->second; 91 tmp[i].second = make_pair(globalIndexSrcGrid[idx][i], currentVecWeight[i]); 92 // globaIndexWeightFromDestToSource[(it->first)][i] = (make_pair(it->second, make_pair(globalIndexSrcGrid[idx][i], currentVecWeight[i]))); 90 93 } 91 94 } -
XIOS/trunk/src/transformation/generic_algorithm_transformation.hpp
r833 r843 21 21 class CGenericAlgorithmTransformation 22 22 { 23 protected: 24 typedef std::vector<std::pair<int, std::pair<size_t,double> > > DestinationGlobalIndex; 23 25 public: 24 26 // Stupid global index map, it must be replaced by tuple 25 27 // Mapping between global index map of DESTINATION and its local index with pair of global index of SOURCE and weights 26 typedef boost::unordered_map<size_t, std::vector<std::pair<int, std::pair<size_t,double> > > > DestinationIndexMap; 28 typedef boost::unordered_map<size_t, DestinationGlobalIndex> DestinationIndexMap; 29 27 30 protected: 28 31 typedef boost::unordered_map<size_t,int> GlobalLocalMap; -
XIOS/trunk/src/transformation/transformation_mapping.cpp
r842 r843 31 31 32 32 // Mapping of global index and pair containing rank and local index 33 CClientClientDHTPairIntInt::Index2InfoTypeMap globalIndexOfServer; 33 CClientClientDHTPairIntInt::Index2InfoTypeMap globalIndexOfClientSrc; 34 globalIndexOfClientSrc.rehash(std::ceil(globalLocalIndexGridSrc.size()/globalIndexOfClientSrc.max_load_factor())); 35 34 36 PairIntInt pairIntInt; 35 37 for (; itIndex != iteIndex; ++itIndex) … … 37 39 pairIntInt.first = clientRank; 38 40 pairIntInt.second = itIndex->second; 39 globalIndexOf Server[itIndex->first] = pairIntInt;40 } 41 42 gridIndexClientClientMapping_ = new CClientClientDHTPairIntInt(globalIndexOf Server,41 globalIndexOfClientSrc[itIndex->first] = pairIntInt; 42 } 43 44 gridIndexClientClientMapping_ = new CClientClientDHTPairIntInt(globalIndexOfClientSrc, 43 45 client->intraComm); 44 46 }
Note: See TracChangeset
for help on using the changeset viewer.