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

make the P2P remote neighbors const

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