Skip to content

Commit

Permalink
Minor code simplification.
Browse files Browse the repository at this point in the history
  • Loading branch information
theurich authored and billsacks committed Dec 13, 2022
1 parent fd86874 commit f4deda9
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/Infrastructure/IO/src/ESMCI_IO.C
Original file line number Diff line number Diff line change
Expand Up @@ -1340,8 +1340,6 @@ void IO::undist_arraycreate_alldist(Array *src_array_p, Array **dest_array_p, in
std::vector<int> minIndexNew(rank*tileCount);
std::vector<int> maxIndexNew(rank*tileCount);
std::vector<int> deBlockList(rank*2*deCount);
std::vector<int> deBlockListLen(3);
deBlockListLen[0]=rank; deBlockListLen[1]=2; deBlockListLen[2]=deCount;
int jj = 0;
for (int i=0; i<rank; i++) {
int j = arrayToDistGridMap[i];
Expand Down Expand Up @@ -1370,7 +1368,8 @@ void IO::undist_arraycreate_alldist(Array *src_array_p, Array **dest_array_p, in
}

// create the fixed up DistGrid, making sure to use original DELayout
ESMCI::InterArray<int> deBlockListInterface(&deBlockList[0], 3, &deBlockListLen[0]);
int deBlockListLen[] = {rank, 2, deCount};
ESMCI::InterArray<int> deBlockListInterface(&deBlockList[0], 3, deBlockListLen);
DELayout *delayout = dg->getDELayout();
DistGrid *dg_temp;
if (tileCount == 1) {
Expand All @@ -1383,9 +1382,7 @@ void IO::undist_arraycreate_alldist(Array *src_array_p, Array **dest_array_p, in
return;
}
} else {
int dummyLen[2];
dummyLen[0] = rank;
dummyLen[1] = tileCount;
int dummyLen[] = {rank, tileCount};
ESMCI::InterArray<int> minIndexInterface(&minIndexNew[0], 2, dummyLen);
ESMCI::InterArray<int> maxIndexInterface(&maxIndexNew[0], 2, dummyLen);
ESMCI::InterArray<int> deToTileMapInterface((int*)(dg->getTileListPDe()), 1, &deCount);
Expand Down

0 comments on commit f4deda9

Please sign in to comment.