Ignore:
Timestamp:
06/13/18 16:48:53 (6 years ago)
Author:
oabramkina
Message:

Replacing Boost's unordered_map and shared_pointer by its STL counterparts.

Two notes for Curie:

  • one can see the content of unordered_map with ddt only if XIOS has been compiled with gnu
  • XIOS will not compile any more with pgi (all available versions use old STL which are not up to the c++11 norms)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/client_client_dht_template_impl.hpp

    r1158 r1542  
    116116  size_t index; 
    117117  HashXIOS<size_t> hashGlobalIndex; 
    118   boost::unordered_map<size_t,int> nbIndices; 
     118  std::unordered_map<size_t,int> nbIndices; 
    119119  nbIndices.rehash(std::ceil(ssize/nbIndices.max_load_factor())); 
    120120  for (int i = 0; i < ssize; ++i) 
     
    131131  } 
    132132 
    133   boost::unordered_map<int, size_t* > client2ClientIndex; 
     133  std::unordered_map<int, size_t* > client2ClientIndex; 
    134134  for (int idx = 0; idx < nbClient; ++idx) 
    135135  { 
     
    183183  } 
    184184 
    185   boost::unordered_map<int, size_t* >::iterator itbIndex = client2ClientIndex.begin(), itIndex, 
     185  std::unordered_map<int, size_t* >::iterator itbIndex = client2ClientIndex.begin(), itIndex, 
    186186                                                iteIndex = client2ClientIndex.end(); 
    187187  for (itIndex = itbIndex; itIndex != iteIndex; ++itIndex) 
     
    257257  } 
    258258 
    259   boost::unordered_map<int,unsigned char*> client2ClientInfoOnReturn; 
    260   boost::unordered_map<int,size_t*> client2ClientIndexOnReturn; 
     259  std::unordered_map<int,unsigned char*> client2ClientInfoOnReturn; 
     260  std::unordered_map<int,size_t*> client2ClientIndexOnReturn; 
    261261  currentIndex = 0; 
    262262  for (int idx = 0; idx < nbRecvClient; ++idx) 
     
    308308  indexToInfoMappingLevel_.swap(indexToInfoMapping); 
    309309  if (0 != recvNbIndexCount) delete [] recvIndexBuff; 
    310   for (boost::unordered_map<int,size_t*>::const_iterator it = client2ClientIndex.begin(); 
     310  for (std::unordered_map<int,size_t*>::const_iterator it = client2ClientIndex.begin(); 
    311311                                                        it != client2ClientIndex.end(); ++it) 
    312312      delete [] it->second; 
     
    319319  } 
    320320 
    321   for (boost::unordered_map<int,unsigned char*>::const_iterator it = client2ClientInfoOnReturn.begin(); 
     321  for (std::unordered_map<int,unsigned char*>::const_iterator it = client2ClientInfoOnReturn.begin(); 
    322322                                                               it != client2ClientInfoOnReturn.end(); ++it) 
    323323      delete [] it->second; 
    324324 
    325   for (boost::unordered_map<int,size_t*>::const_iterator it = client2ClientIndexOnReturn.begin(); 
     325  for (std::unordered_map<int,size_t*>::const_iterator it = client2ClientIndexOnReturn.begin(); 
    326326                                            it != client2ClientIndexOnReturn.end(); ++it) 
    327327      delete [] it->second; 
     
    389389  } 
    390390 
    391   boost::unordered_map<int, size_t*> client2ClientIndex; 
    392   boost::unordered_map<int, unsigned char*> client2ClientInfo; 
     391  std::unordered_map<int, size_t*> client2ClientIndex; 
     392  std::unordered_map<int, unsigned char*> client2ClientInfo; 
    393393  for (int idx = 0; idx < nbClient; ++idx) 
    394394  { 
     
    455455  } 
    456456 
    457   boost::unordered_map<int, size_t* >::iterator itbIndex = client2ClientIndex.begin(), itIndex, 
     457  std::unordered_map<int, size_t* >::iterator itbIndex = client2ClientIndex.begin(), itIndex, 
    458458                                                iteIndex = client2ClientIndex.end(); 
    459459  for (itIndex = itbIndex; itIndex != iteIndex; ++itIndex) 
    460460    sendIndexToClients(itIndex->first, itIndex->second, sendNbIndexBuff[itIndex->first-groupRankBegin], commLevel, request); 
    461   boost::unordered_map<int, unsigned char*>::iterator itbInfo = client2ClientInfo.begin(), itInfo, 
     461  std::unordered_map<int, unsigned char*>::iterator itbInfo = client2ClientInfo.begin(), itInfo, 
    462462                                                      iteInfo = client2ClientInfo.end(); 
    463463  for (itInfo = itbInfo; itInfo != iteInfo; ++itInfo) 
     
    490490    delete [] recvInfoBuff; 
    491491  } 
    492   for (boost::unordered_map<int,unsigned char*>::const_iterator it = client2ClientInfo.begin(); 
     492  for (std::unordered_map<int,unsigned char*>::const_iterator it = client2ClientInfo.begin(); 
    493493                                                               it != client2ClientInfo.end(); ++it) 
    494494      delete [] it->second; 
    495495 
    496   for (boost::unordered_map<int,size_t*>::const_iterator it = client2ClientIndex.begin(); 
     496  for (std::unordered_map<int,size_t*>::const_iterator it = client2ClientIndex.begin(); 
    497497                                                        it != client2ClientIndex.end(); ++it) 
    498498      delete [] it->second; 
Note: See TracChangeset for help on using the changeset viewer.