Ignore:
Timestamp:
03/10/15 10:49:09 (9 years ago)
Author:
mhnguyen
Message:

Implementing discovering algorithm of server index

+) Implement the algorithm with only one level
+) Remove some redundant functions, corrects some interface

Test
+) On Curie
+) Test passed and results are correct

File:
1 edited

Legend:

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

    r554 r568  
    1313#include "xmlioserver_spl.hpp" 
    1414#include "array_new.hpp" 
     15#include <boost/unordered_map.hpp> 
    1516 
    1617namespace xios 
     
    3637                                   ServerDistributionType type = BAND_DISTRIBUTION); 
    3738 
    38     const CArray<size_t,1>& computeServerGlobalIndex(int nServer, int serverRank, 
    39                                                      ServerDistributionType = BAND_DISTRIBUTION); 
     39    void computeServerGlobalIndexInRange(int nServer, 
     40                                         const std::pair<size_t, size_t>& indexBeginEnd, 
     41                                         ServerDistributionType = BAND_DISTRIBUTION); 
    4042 
    4143    std::vector<std::vector<int> > getServerIndexBegin() const; 
    4244    std::vector<std::vector<int> > getServerDimensionSizes() const; 
    4345    const std::vector<CArray<size_t,1>* >& getGlobalIndex() const; 
     46    const boost::unordered_map<size_t,int>& getGlobalIndexRange() const; 
    4447 
    4548  protected: 
     
    5659 
    5760    //!< In case we need only global index of one server with specific rank 
    58     CArray<size_t,1>* globalIndex_; 
     61    boost::unordered_map<size_t,int> globalIndex_; 
    5962}; 
    6063 
Note: See TracChangeset for help on using the changeset viewer.