Commit 83829dee authored by PIACIBELLO Cyrille's avatar PIACIBELLO Cyrille
Browse files

Changes to tree builder, should work fine

parent 180ba06e
......@@ -50,7 +50,7 @@ public:
MortonIndex index;
ParticleClass particle;
operator MortonIndex(){
operator MortonIndex() const {
return this->index;
}
};
......@@ -270,9 +270,10 @@ private:
}
*leavesSize = idxInIndices;
*leavesIndices = new FSize[idxInIndices];
*leavesIndices = new FSize[idxInIndices+1];
memcpy(*leavesIndices,tempIndicesArray,(*leavesSize)*sizeof(FSize));
(*leavesIndices)[idxInIndices] = *workingSize;
//printf("leaves Indices : %lld : %lld\n",*leavesSize,*workingSize);
}
delete [] workingArray;
......@@ -340,10 +341,11 @@ private:
const std::vector<FEqualize::Package> packsToSend = FEqualize::GetPackToSend(myCurrentInter, allObjectives);
for(const FEqualize::Package& pack : packsToSend){
printf("%d] to %d from %llu to %llu\n", myRank, pack.idProc, pack.elementFrom, pack.elementTo);
if(pack.idProc != myRank){
//printf("%d] to %d from %llu to %llu, will be %lld myNbLeaf : %lu\n", myRank, pack.idProc, pack.elementFrom, pack.elementTo,leavesIndices[pack.elementTo] - leavesIndices[pack.elementFrom],nbLeavesInIntervals);
idxToSend[pack.idProc] = pack.elementFrom;
toSend[pack.idProc] = (pack.elementTo ? leavesIndices[pack.elementTo-1] : 0)
- (pack.elementFrom ? leavesIndices[pack.elementFrom-1] : 0);
toSend[pack.idProc] = leavesIndices[pack.elementTo] - leavesIndices[pack.elementFrom];
}
}
//Then, we exchange the datas to send
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment