Commit 44fea386 authored by BRAMAS Berenger's avatar BRAMAS Berenger

make the P2P remote neighbors const

parent e73463c0
......@@ -357,7 +357,7 @@ public:
/** This is a normal P2P */
void P2PRemote(const FTreeCoordinate& inLeafPosition,
ContainerClass* const FRestrict targets, const ContainerClass* const FRestrict sources,
ContainerClass* const directNeighborsParticles[], const int positions[], const int size) override {
const ContainerClass* const directNeighborsParticles[], const int positions[], const int size) override {
kernel.P2PRemote(inLeafPosition, targets, sources, directNeighborsParticles, positions, size);
}
......
......@@ -65,7 +65,7 @@ public:
void P2PRemote(const FTreeCoordinate& ,
ContainerClass* const FRestrict targets, const ContainerClass* const FRestrict ,
ContainerClass* const neighs[], const int /*positions*/[], const int size) override {
const ContainerClass* const neighs[], const int /*positions*/[], const int size) override {
std::cout << "Usual] P2P remote @" << targets << " has " << targets->getNbParticles() << " with\n";
for(int idxNeigh = 0 ; idxNeigh < size ; ++idxNeigh){
std::cout << "\t @" << neighs[idxNeigh]<< " has " << neighs[idxNeigh]->getNbParticles() << "\n";
......
......@@ -216,7 +216,7 @@ public:
*/
virtual void P2PRemote(const FTreeCoordinate& /*inLeafPosition*/,
ContainerClass* const FRestrict /*targets*/, const ContainerClass* const FRestrict /*sources*/,
ContainerClass* const /*directNeighborsParticles*/[],
const ContainerClass* const /*directNeighborsParticles*/[],
const int /*neighborPositions*/[], const int /*size*/) {
FLOG( FLog::Controller.write("Warning, P2P remote is used but not implemented!").write(FLog::Flush) );
}
......
......@@ -79,7 +79,7 @@ public:
/** Do nothing */
virtual void P2PRemote(const FTreeCoordinate& /*treeCoord*/,
ContainerClass* const FRestrict /*targetParticles*/, const ContainerClass* const FRestrict /*sourceParticles*/,
ContainerClass* const /*neigbhorsParticles*/[], const int /*neighborPositions*/[], const int /*nbNeighbors*/) override {
const ContainerClass* const /*neigbhorsParticles*/[], const int /*neighborPositions*/[], const int /*nbNeighbors*/) override {
}
......
......@@ -130,7 +130,7 @@ public:
/** After Downward */
void P2PRemote(const FTreeCoordinate& ,
ContainerClass* const FRestrict targets, const ContainerClass* const FRestrict /*sources*/,
ContainerClass* const directNeighborsParticles[], const int /*positions*/[], const int inSize) override {
const ContainerClass* const directNeighborsParticles[], const int /*positions*/[], const int inSize) override {
// Each particles targeted is impacted by the particles sources
long long int inc = 0;
for(int idx = 0 ; idx < inSize ; ++idx){
......
......@@ -164,7 +164,7 @@ public:
virtual void P2PRemote(const FTreeCoordinate& /*inPosition*/,
ContainerClass* const FRestrict inTargets, const ContainerClass* const FRestrict /*inSources*/,
ContainerClass* const inNeighbors[], const int SourcePositions[], const int /*inSize*/) = 0;
const ContainerClass* const inNeighbors[], const int SourcePositions[], const int /*inSize*/) = 0;
};
......
......@@ -235,7 +235,7 @@ public:
void P2PRemote(const FTreeCoordinate& /*inPosition*/,
ContainerClass* const FRestrict inTargets, const ContainerClass* const FRestrict /*inSources*/,
ContainerClass* const inNeighbors[], const int /*neighborPositions*/[],
const ContainerClass* const inNeighbors[], const int /*neighborPositions*/[],
const int inSize) override {
DirectInteractionComputer<FReal, MatrixKernelClass::NCMP, NVALS>::P2PRemote(inTargets,inNeighbors,inSize,MatrixKernel);
}
......
......@@ -477,7 +477,7 @@ public:
void P2PRemote(const FTreeCoordinate& /*inPosition*/,
ContainerClass* const FRestrict inTargets, const ContainerClass* const FRestrict /*inSources*/,
ContainerClass* const inNeighbors[], const int /*neighborPositions*/[],
const ContainerClass* const inNeighbors[], const int /*neighborPositions*/[],
const int inSize) override {
DirectInteractionComputer<FReal, MatrixKernelClass::NCMP, NVALS>::P2PRemote(inTargets,inNeighbors,inSize,MatrixKernel);
}
......
......@@ -249,7 +249,7 @@ public:
void P2PRemote(const FTreeCoordinate& /*inPosition*/,
ContainerClass* const FRestrict inTargets, const ContainerClass* const FRestrict /*inSources*/,
ContainerClass* const inNeighbors[], const int /*neighborPositions*/[],
const ContainerClass* const inNeighbors[], const int /*neighborPositions*/[],
const int inSize) override {
DirectInteractionComputer<FReal, MatrixKernelClass::NCMP, NVALS>::P2PRemote(inTargets,inNeighbors,inSize,MatrixKernel);
}
......
......@@ -1385,7 +1385,7 @@ public:
/** Use mutual even if it not useful and call particlesMutualInteraction */
void P2PRemote(const FTreeCoordinate& /*inPosition*/,
ContainerClass* const FRestrict inTargets, const ContainerClass* const FRestrict /*inSources*/,
ContainerClass* const inNeighbors[], const int neighborPositions[],
const ContainerClass* const inNeighbors[], const int neighborPositions[],
const int inSize) override {
FP2PRT<FReal>::template FullRemote<ContainerClass>(inTargets,inNeighbors,inSize);
}
......
......@@ -821,7 +821,7 @@ public:
/** Use mutual even if it not useful and call particlesMutualInteraction */
void P2PRemote(const FTreeCoordinate& /*inPosition*/,
ContainerClass* const FRestrict inTargets, const ContainerClass* const FRestrict /*inSources*/,
ContainerClass* const inNeighbors[], const int neighborPositions[],
const ContainerClass* const inNeighbors[], const int neighborPositions[],
const int inSize) override {
FP2PRT<FReal>::template FullRemote<ContainerClass>(inTargets,inNeighbors,inSize);
}
......
......@@ -248,7 +248,7 @@ public:
/** Use mutual even if it not useful and call particlesMutualInteraction */
void P2PRemote(const FTreeCoordinate& /*inPosition*/,
ContainerClass* const FRestrict inTargets, const ContainerClass* const FRestrict /*inSources*/,
ContainerClass* const inNeighbors[], const int neighborPositions[],
const ContainerClass* const inNeighbors[], const int neighborPositions[],
const int inSize) override {
FP2PRT<FReal>::template FullRemote<ContainerClass>(inTargets,inNeighbors,inSize);
}
......
......@@ -988,7 +988,7 @@ public:
/** Use mutual even if it not useful and call particlesMutualInteraction */
void P2PRemote(const FTreeCoordinate& /*inPosition*/,
ContainerClass* const FRestrict inTargets, const ContainerClass* const FRestrict /*inSources*/,
ContainerClass* const inNeighbors[], const int neighborPositions[],
const ContainerClass* const inNeighbors[], const int neighborPositions[],
const int inSize) override {
FP2PRT<FReal>::template FullRemote<ContainerClass>(inTargets,inNeighbors,inSize);
}
......
......@@ -898,7 +898,7 @@ public:
/** Use mutual even if it not useful and call particlesMutualInteraction */
void P2PRemote(const FTreeCoordinate& /*inPosition*/,
ContainerClass* const FRestrict inTargets, const ContainerClass* const FRestrict /*inSources*/,
ContainerClass* const inNeighbors[], const int neighborPositions[],
const ContainerClass* const inNeighbors[], const int neighborPositions[],
const int inSize) override {
FP2PRT<FReal>::template FullRemote<ContainerClass>(inTargets,inNeighbors,inSize);
}
......
......@@ -160,7 +160,7 @@ public:
virtual void P2PRemote(const FTreeCoordinate& /*inPosition*/,
ContainerClass* const FRestrict inTargets,
const ContainerClass* const FRestrict /*inSources*/,
ContainerClass* const inNeighbors[],
const ContainerClass* const inNeighbors[],
const int neighborPositions[],
const int /*inSize*/) = 0;
......
......@@ -192,7 +192,7 @@ public:
void P2PRemote(const FTreeCoordinate& /*inPosition*/,
ContainerClass* const FRestrict inTargets, const ContainerClass* const FRestrict /*inSources*/,
ContainerClass* const inNeighbors[], const int /*neighborPositions*/[],
const ContainerClass* const inNeighbors[], const int /*neighborPositions*/[],
const int inSize) override {
DirectInteractionComputer<FReal, MatrixKernelClass::NCMP, NVALS>::P2PRemote(inTargets,inNeighbors,inSize,MatrixKernel);
}
......
......@@ -225,7 +225,7 @@ public:
void P2PRemote(const FTreeCoordinate& /*inPosition*/,
ContainerClass* const FRestrict inTargets, const ContainerClass* const FRestrict /*inSources*/,
ContainerClass* const inNeighbors[], const int /*neighborPositions*/[],
const ContainerClass* const inNeighbors[], const int /*neighborPositions*/[],
const int inSize) override {
// Standard FMM separation criterion, i.e. max 27 neighbor clusters per leaf
if(LeafLevelSeparationCriterion==1)
......
......@@ -280,7 +280,7 @@ public:
void P2PRemote(const FTreeCoordinate& /*inPosition*/,
ContainerClass* const FRestrict inTargets, const ContainerClass* const FRestrict /*inSources*/,
ContainerClass* const inNeighbors[], const int /*neighborPositions*/[],
const ContainerClass* const inNeighbors[], const int /*neighborPositions*/[],
const int inSize) override {
DirectInteractionComputer<FReal, MatrixKernelClass::NCMP, NVALS>::P2PRemote(inTargets,inNeighbors,inSize,MatrixKernel);
}
......
......@@ -177,7 +177,7 @@ public:
void P2PRemote(const FTreeCoordinate& ,
ContainerClass* const FRestrict /*targets*/, const ContainerClass* const FRestrict /*sources*/,
ContainerClass* const /*directNeighborsParticles*/[], const int /*neighborPosition*/[], const int /*size*/) override{
const ContainerClass* const /*directNeighborsParticles*/[], const int /*neighborPosition*/[], const int /*size*/) override{
nbFmmOperations += 1;
nbFmmOperationsVerbose[5] += 1;
}
......
Markdown is supported
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