Changeset 569 for XIOS/trunk/src/server_distribution_description.cpp
- Timestamp:
- 03/10/15 10:49:13 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/server_distribution_description.cpp
r568 r569 3 3 \author Ha NGUYEN 4 4 \since 04 Jan 2015 5 \date 09 Feb20155 \date 09 Mars 2015 6 6 7 7 \brief Description of index distribution on server(s). … … 15 15 : nGlobal_(globalDimensionSize), indexBegin_(), dimensionSizes_(), globalIndex_(), vecGlobalIndex_() 16 16 { 17 18 17 } 19 18 20 19 CServerDistributionDescription::~CServerDistributionDescription() 21 20 { 22 // if (0 != globalIndex_) delete globalIndex_;23 21 if (!vecGlobalIndex_.empty()) 24 22 for (int i = 0; i < vecGlobalIndex_.size(); ++i) delete vecGlobalIndex_[i]; … … 92 90 } 93 91 92 /*! 93 Compute global index assigned to a server with a range.E.g: if a grid has 100 points and 94 there are 2 servers, the first one takes index from 0 to 49, the second has index from 50 to 99 95 \param [in] nServer number of server 96 \param [in] indexBeginEnd begining and ending index of range 97 \param [in] serType type of server distribution. For now, we can distribute server by band or plan 98 */ 94 99 void CServerDistributionDescription::computeServerGlobalIndexInRange(int nServer, 95 100 const std::pair<size_t, size_t>& indexBeginEnd, … … 117 122 size_t ssize = 1, idx = 0; 118 123 for (int j = 0; j < dim; ++j) ssize *= dimensionSizes_[idxServer][j]; 119 vecGlobalIndex_[idxServer] = new CArray<size_t,1>(ssize);120 124 121 125 std::vector<int> idxLoop(dim,0); 122 123 126 int innerLoopSize = dimensionSizes_[idxServer][0]; 124 127 … … 243 246 } 244 247 248 /*! 249 Get global index calculated by computeServerGlobalIndexInRange 250 */ 245 251 const boost::unordered_map<size_t,int>& CServerDistributionDescription::getGlobalIndexRange() const 246 252 {
Note: See TracChangeset
for help on using the changeset viewer.