source: XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/distribution.cpp @ 2230

Last change on this file since 2230 was 1918, checked in by ymipsl, 4 years ago

Big update on on going work related to data distribution and transfer between clients and servers.

  • move all related file into distribution directorie
  • implement the concept of data "View"
  • implement the concept of "connector" which make the data transfer between 2 differents "Views"

YM

  • Property svn:eol-style set to native
File size: 699 bytes
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#include "distribution.hpp"
10
11namespace xios {
12
13CDistribution::CDistribution(int rank, int dims, const CArray<size_t,1>& globalIndex)
14  : rank_(rank), dims_(dims), globalIndex_(globalIndex.shape())
15{
16  if (0 != globalIndex.numElements())
17    globalIndex_ = globalIndex;
18}
19
20const CArray<size_t,1>& CDistribution:: getGlobalIndex() const 
21{ 
22  return globalIndex_; 
23}
24
25CDistribution::~CDistribution()
26{ /* Nothing to do */ }
27
28int CDistribution::getDims() const
29{
30  return dims_;
31}
32
33int CDistribution::getRank() const
34{
35  return rank_;
36}
37
38} // namespace xios
Note: See TracBrowser for help on using the repository browser.