Ignore:
Timestamp:
02/11/15 16:23:07 (9 years ago)
Author:
mhnguyen
Message:

Doing some cleans and improving a little bit performance of creating local index on server

+) Add some comments, add some initialization
+) Change the way to calculate local index on server

Test
+) On Curie

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/node/distribution_server.hpp

    r551 r552  
    55 
    66namespace xios { 
     7/*! 
     8\class CDistributionServer 
     9 The class, for now, plays a role of computing local index for writing data on server 
     10*/ 
    711class CDistributionServer : public CDistribution 
    812{ 
    913  public: 
    1014    /** Default constructor */ 
    11     CDistributionServer(int rank, int dims, int nServer, CArray<size_t,1>* globalIndex = 0); 
    12     CDistributionServer(int rank, int nServer, const std::vector<int>& nGlobal); 
     15    CDistributionServer(int rank, int dims, CArray<size_t,1>* globalIndex = 0); 
     16    CDistributionServer(int rank, const std::vector<int>& nZoomBegin, 
     17                        const std::vector<int>& nZoomSize, const std::vector<int>& nGlobal); 
    1318 
    1419    /** Default destructor */ 
    1520    virtual ~CDistributionServer(); 
    1621 
     22    CArray<size_t,1> computeLocalIndex(const CArray<size_t,1>& globalIndex); 
     23    void computeLocalIndex(CArray<size_t,1>& globalIndex); 
     24 
    1725  protected: 
    1826    virtual void createGlobalIndex(); 
    19  
    20     //! Read info 
    21     void readDistributionInfo(const std::vector<int>& nGlobal); 
    2227  private: 
    23     int nServer_; 
    2428    std::vector<int> nGlobal_; 
     29    std::vector<int> nZoomSize_; 
     30    std::vector<int> nZoomBegin_; 
    2531}; 
    2632 
    27 } 
     33} // namespace xios 
    2834#endif // __XIOS_DISTRIBUTION_SERVER_HPP__ 
Note: See TracChangeset for help on using the changeset viewer.