Commit dfafcdb8 authored by Quentin Khan's avatar Quentin Khan

FFmmAlgorithmThread: chunksize correction

parent d89a32ac
......@@ -60,7 +60,7 @@ class FFmmAlgorithmThread : public FAbstractAlgorithm, public FAlgorithmTimers{
const int OctreeHeight; ///< The height of the given tree.
const int userChunkSize;
int userChunkSize;
const int leafLevelSeperationCriteria;
......@@ -79,7 +79,7 @@ public:
const int inUserChunkSize = 10, const int inLeafLevelSeperationCriteria = 1)
: tree(inTree) , kernels(nullptr), iterArray(nullptr), leafsNumber(0),
MaxThreads(omp_get_max_threads()), OctreeHeight(tree->getHeight()),
userChunckSize(inUserChunckSize), leafLevelSeperationCriteria(inLeafLevelSeperationCriteria) {
userChunkSize(inUserChunkSize), leafLevelSeperationCriteria(inLeafLevelSeperationCriteria) {
FAssertLF(tree, "tree cannot be null");
this->kernels = new KernelClass*[MaxThreads];
......@@ -94,7 +94,7 @@ public:
FAbstractAlgorithm::setNbLevelsInTree(tree->getHeight());
FLOG(FLog::Controller << "FFmmAlgorithmThread (Max Thread " << omp_get_max_threads() << ")\n");
FLOG(FLog::Controller << "\t static schedule " << (userChunckSize == -1?"static":(userChunckSize == 0?"N/p^2":userChunckSize)) << ")\n");
FLOG(FLog::Controller << "\t static schedule " << (userChunkSize == -1 ? "static" : (userChunkSize == 0 ? "N/p^2" : std::to_string(userChunkSize))) << ")\n");
}
/** Default destructor */
......
......@@ -49,8 +49,7 @@ public:
void run() {
_algo = std::unique_ptr<FMMClass>(
new FMMClass(&(_treeLoader._tree), &(_kernelLoader._kernel),
_omp_static_schedule));
new FMMClass(&(_treeLoader._tree), &(_kernelLoader._kernel)));
_algo->setChunkSize(_omp_chunk_size);
_algo->execute();
......
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