Last change
on this file since 2226 was
930,
checked in by mhnguyen, 8 years ago
|
Improving the performance of on server side
+) Replace searching algorithm for global-local index with a better one
Test
+) On Curie
+) Work correct
|
File size:
1.1 KB
|
Line | |
---|
1 | /*! |
---|
2 | \file distribution.hpp |
---|
3 | \author Ha NGUYEN |
---|
4 | \since 13 Jan 2015 |
---|
5 | \date 09 Feb 2015 |
---|
6 | |
---|
7 | \brief Index distribution on server side. |
---|
8 | */ |
---|
9 | #ifndef __XIOS_DISTRIBUTION_HPP__ |
---|
10 | #define __XIOS_DISTRIBUTION_HPP__ |
---|
11 | |
---|
12 | #include "xios_spl.hpp" |
---|
13 | #include "array_new.hpp" |
---|
14 | #include <boost/unordered_map.hpp> |
---|
15 | |
---|
16 | namespace xios { |
---|
17 | /*! |
---|
18 | \class CDistribution |
---|
19 | The parent class of CDistributionClient and CDistributionServer, which declares and defines |
---|
20 | some basic methods and properties for its children. This class allows its descendants to calculate |
---|
21 | distribution of index on client or server side. |
---|
22 | */ |
---|
23 | class CDistribution |
---|
24 | { |
---|
25 | public: |
---|
26 | typedef boost::unordered_map<size_t,int> GlobalLocalMap; |
---|
27 | |
---|
28 | public: |
---|
29 | /** Default constructor */ |
---|
30 | CDistribution(int rank, int dims, const CArray<size_t,1>& globalIndex = CArray<size_t,1>()); |
---|
31 | |
---|
32 | /** Default destructor */ |
---|
33 | virtual ~CDistribution(); |
---|
34 | |
---|
35 | int getDims() const; //! Get dimension size |
---|
36 | int getRank() const; //! Get rank of current process |
---|
37 | |
---|
38 | protected: |
---|
39 | virtual void createGlobalIndex() {}; |
---|
40 | |
---|
41 | protected: |
---|
42 | CArray<size_t,1> globalIndex_; |
---|
43 | int dims_; |
---|
44 | int rank_; |
---|
45 | }; |
---|
46 | |
---|
47 | } // namespace xios |
---|
48 | #endif // __XIOS_DISTRIBUTION_HPP__ |
---|
Note: See
TracBrowser
for help on using the repository browser.