63 this->_locChunkSize = (globChunkSize+size-rank-1)/size;
64 this->_size = _locChunkSize;
65 if (rank+1 <= globChunkSize-(globChunkSize/size)*size) {
66 this->_firstGlobNum = globChunkSize/size * rank + rank + offset;
67 this->_lastGlobNum = this->_firstGlobNum + this->_locChunkSize - 1;
70 this->_firstGlobNum = globChunkSize/size * rank + globChunkSize - (globChunkSize/size)*size + offset;
71 this->_lastGlobNum = this->_firstGlobNum + this->_locChunkSize - 1;
73 for (
int i=0; i<this->_locChunkSize; i++) {
74 this->_loc[this->_firstGlobNum + i] = i;
75 this->_glob.push_back(this->_firstGlobNum + i);
78 for (
int iRank=0; iRank<size; iRank++) {
79 int iLocChunkSize = (globChunkSize+size-iRank-1)/size;
80 for (
int i=0; i<iLocChunkSize; i++) {
81 this->_rank[temp] = iRank;