/*! \file distribution_server.hpp \author Ha NGUYEN \since 13 Jan 2015 \date 04 Feb 2015 \brief Index distribution on server side. */ #ifndef __XIOS_DISTRIBUTION_SERVER_HPP__ #define __XIOS_DISTRIBUTION_SERVER_HPP__ #include "distribution.hpp" namespace xios { /*! \class CDistributionServer The class, for now, plays a role of computing local index for writing data on server */ class CDistributionServer : public CDistribution { public: /** Default constructor */ CDistributionServer(int rank, int dims, CArray* globalIndex = 0); CDistributionServer(int rank, const std::vector& nZoomBeginServer, const std::vector& nZoomSizeServer, const std::vector& nGlobal); CDistributionServer(int rank, const std::vector& nZoomBeginServer, const std::vector& nZoomSizeServer, const std::vector& nZoomBeginGlobal, const std::vector& nGlobal); /** Default destructor */ virtual ~CDistributionServer(); std::vector getZoomBeginGlobal() const; std::vector getZoomBeginServer() const; std::vector getZoomSizeServer() const; virtual CArray computeLocalIndex(const CArray& globalIndex); virtual void computeLocalIndex(CArray& globalIndex); protected: virtual void createGlobalIndex(); private: std::vector nGlobal_; std::vector nZoomBeginGlobal_; std::vector nZoomSize_; std::vector nZoomBegin_; }; } // namespace xios #endif // __XIOS_DISTRIBUTION_SERVER_HPP__