source: XIOS/trunk/src/node/distribution_server.hpp @ 552

Last change on this file since 552 was 552, checked in by mhnguyen, 9 years ago

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 size: 1016 bytes
RevLine 
[551]1#ifndef __XIOS_DISTRIBUTION_SERVER_HPP__
2#define __XIOS_DISTRIBUTION_SERVER_HPP__
3
4#include "distribution.hpp"
5
6namespace xios {
[552]7/*!
8\class CDistributionServer
9 The class, for now, plays a role of computing local index for writing data on server
10*/
[551]11class CDistributionServer : public CDistribution
12{
13  public:
14    /** Default constructor */
[552]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);
[551]18
19    /** Default destructor */
20    virtual ~CDistributionServer();
21
[552]22    CArray<size_t,1> computeLocalIndex(const CArray<size_t,1>& globalIndex);
23    void computeLocalIndex(CArray<size_t,1>& globalIndex);
24
[551]25  protected:
26    virtual void createGlobalIndex();
27  private:
28    std::vector<int> nGlobal_;
[552]29    std::vector<int> nZoomSize_;
30    std::vector<int> nZoomBegin_;
[551]31};
32
[552]33} // namespace xios
[551]34#endif // __XIOS_DISTRIBUTION_SERVER_HPP__
Note: See TracBrowser for help on using the repository browser.