Commit e862a0be authored by berenger-bramas's avatar berenger-bramas

Improve the Task FMM.

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/scalfmm/scalfmm/trunk@275 2616d619-271b-44dc-8df4-d4a8f33a7222
parent 74ff028c
......@@ -11,7 +11,6 @@
#include "../Containers/FOctree.hpp"
#include "../Containers/FVector.hpp"
#include <list>
/**
* @author Berenger Bramas (berenger.bramas@inria.fr)
......@@ -274,7 +273,7 @@ private:
#pragma omp single nowait
{
const int SizeShape = 3*3*3;
std::list<typename OctreeClass::Iterator> shapes[SizeShape];
FVector<typename OctreeClass::Iterator> shapes[SizeShape];
typename OctreeClass::Iterator octreeIterator(tree);
octreeIterator.gotoBottomLeft();
......@@ -298,7 +297,7 @@ private:
}
}
else{
shapes[shapePosition].push_front(octreeIterator);
shapes[shapePosition].push(octreeIterator);
}
} while(octreeIterator.moveRight());
......@@ -306,14 +305,14 @@ private:
#pragma omp taskwait
for( int idxShape = 1 ; idxShape < SizeShape ; ++idxShape){
while( shapes[idxShape].size() ){
typename OctreeClass::Iterator toWork = shapes[idxShape].front();
int iterLeaf = shapes[idxShape].getSize();
while( iterLeaf-- ){
typename OctreeClass::Iterator toWork = shapes[idxShape][iterLeaf];
#pragma omp task
{
const int counter = tree->getLeafsNeighborsWithIndex(neighbors, neighborsIndex, toWork.getCurrentGlobalIndex(),heightMinusOne);
myThreadkernels->P2P(toWork.getCurrentGlobalIndex(),toWork.getCurrentListTargets(), toWork.getCurrentListSrc() , neighbors, neighborsIndex, counter);
}
shapes[idxShape].pop_front();
}
#pragma omp taskwait
......
......@@ -50,7 +50,7 @@ int main(int argc, char ** argv){
std::cout << ">> This executable has to be used to test the FMM algorithm.\n";
//////////////////////////////////////////////////////////////
const int NbLevels = FParameters::getValue(argc,argv,"-h", 9);
const int NbLevels = FParameters::getValue(argc,argv,"-h", 7);
const int SizeSubLevels = FParameters::getValue(argc,argv,"-sh", 3);
const long NbPart = FParameters::getValue(argc,argv,"-nb", 2000000);
const FReal FRandMax = FReal(RAND_MAX);
......
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