Changeset 653 for XIOS/trunk/src/server_distribution_description.cpp
- Timestamp:
- 07/24/15 16:40:06 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/server_distribution_description.cpp
r569 r653 18 18 19 19 CServerDistributionDescription::~CServerDistributionDescription() 20 { 21 if (!vecGlobalIndex_.empty()) 22 for (int i = 0; i < vecGlobalIndex_.size(); ++i) delete vecGlobalIndex_[i]; 23 } 20 { /* Nothing to do */ } 24 21 25 22 /*! … … 51 48 size_t ssize = 1, idx = 0; 52 49 for (int j = 0; j < dim; ++j) ssize *= dimensionSizes_[idxServer][j]; 53 vecGlobalIndex_[idxServer] = new CArray<size_t,1>(ssize);50 vecGlobalIndex_[idxServer].resize(ssize); 54 51 55 52 std::vector<int> idxLoop(dim,0); … … 79 76 { 80 77 mulDim *= nGlobal_[k-1]; 81 globalIndex += (currentIndex[k])*mulDim;78 globalIndex += currentIndex[k] * mulDim; 82 79 } 83 (*vecGlobalIndex_[idxServer])(idx) = globalIndex;80 vecGlobalIndex_[idxServer](idx) = globalIndex; 84 81 ++idx; 85 82 } … … 241 238 \return global index on server(s) 242 239 */ 243 const std::vector<CArray<size_t,1> *>& CServerDistributionDescription::getGlobalIndex() const240 const std::vector<CArray<size_t,1> >& CServerDistributionDescription::getGlobalIndex() const 244 241 { 245 242 return vecGlobalIndex_;
Note: See TracChangeset
for help on using the changeset viewer.