Last change
on this file since 551 was
551,
checked in by mhnguyen, 9 years ago
|
Redesigning grid structure
+) Add an intermediate class to calculate distribution on client and servers
+) Change all index of attributes to zero (0), instead of one(1)
Test
+) On Curie
+) Test new features passes but some data are still shifted
|
File size:
582 bytes
|
Line | |
---|
1 | #include "distribution.hpp" |
---|
2 | |
---|
3 | namespace xios { |
---|
4 | |
---|
5 | CDistribution::CDistribution(int rank, int dims, CArray<size_t,1>* globalIndex) |
---|
6 | : rank_(rank), dims_(dims), globalIndex_(globalIndex) |
---|
7 | { |
---|
8 | if (0 != globalIndex) |
---|
9 | { |
---|
10 | globalIndex_ = new CArray<size_t,1>(globalIndex->numElements()); |
---|
11 | *globalIndex_ = *globalIndex; |
---|
12 | } |
---|
13 | } |
---|
14 | |
---|
15 | CDistribution::~CDistribution() |
---|
16 | { |
---|
17 | } |
---|
18 | |
---|
19 | const CArray<size_t,1>* CDistribution::getGlobalIndex() const |
---|
20 | { |
---|
21 | return globalIndex_; |
---|
22 | } |
---|
23 | |
---|
24 | int CDistribution::getDims() const |
---|
25 | { |
---|
26 | return dims_; |
---|
27 | } |
---|
28 | |
---|
29 | int CDistribution::getRank() const |
---|
30 | { |
---|
31 | return rank_; |
---|
32 | } |
---|
33 | |
---|
34 | } // namespace xios |
---|
Note: See
TracBrowser
for help on using the repository browser.