Ignore:
Timestamp:
03/23/16 16:11:01 (8 years ago)
Author:
mhnguyen
Message:

Refactoring transformation code

+) On exchanging information during transformation, not only global index are sent but also local index
+) Correct a bug in distributed hash table (dht)
+) Add new type for dht
+) Clean up some redundant codes

Test
+) On Curie
+) Every test passes
+) Code runs faster in some cases (up to 30%)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/node/axis.cpp

    r823 r829  
    433433    CServerDistributionDescription serverDescriptionGlobal(globalDim, nbServer); 
    434434    int distributedDimensionOnServer = serverDescriptionGlobal.getDimensionDistributed(); 
    435     std::map<int, std::vector<size_t> > globalIndexAxisOnServer; 
     435    CClientServerMapping::GlobalIndexMap globalIndexAxisOnServer; 
    436436    if (distributedDimensionOnServer == orderPositionInGrid) // So we have distributed axis on client side and also on server side* 
    437437    { 
     
    472472    } 
    473473 
    474     std::map<int, std::vector<size_t> >::const_iterator it = globalIndexAxisOnServer.begin(), 
    475                                                        ite = globalIndexAxisOnServer.end(); 
     474    CClientServerMapping::GlobalIndexMap::const_iterator it = globalIndexAxisOnServer.begin(), 
     475                                                         ite = globalIndexAxisOnServer.end(); 
    476476    std::vector<size_t>::const_iterator itbVec = (globalAxisZoom).begin(), 
    477477                                        iteVec = (globalAxisZoom).end(); 
     
    505505    if (!indSrv_.empty()) 
    506506    { 
     507      std::map<int, vector<size_t> >::const_iterator itIndSrv  = indSrv_.begin(), 
     508                                                     iteIndSrv = indSrv_.end(); 
    507509      connectedServerRank_.clear(); 
    508       for (it = indSrv_.begin(); it != indSrv_.end(); ++it) 
    509         connectedServerRank_.push_back(it->first); 
     510      for (; itIndSrv != iteIndSrv; ++itIndSrv) 
     511        connectedServerRank_.push_back(itIndSrv->first); 
    510512    } 
    511513    nbConnectedClients_ = CClientServerMapping::computeConnectedClients(client->serverSize, client->clientSize, client->intraComm, connectedServerRank_); 
Note: See TracChangeset for help on using the changeset viewer.