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