Commit a2549086 authored by Quentin Khan's avatar Quentin Khan

PerfTest: remove unused parameter

PerfTestUtils: remove unused parameter
AlgoLoaderThread: remove unused parameter
parent 31e95299
......@@ -12,10 +12,16 @@
#include "Core/FFmmAlgorithmThread.hpp"
/**
* \brief Algorithm loader for FFmmAlgorithmThread
*
* See FAlgoLoader.
*/
template <class _TreeLoader, template<typename> class _KernelLoader>
class AlgoLoaderThread : public FAlgoLoader<_TreeLoader, _KernelLoader> {
public:
// Type definitions, allows them to be reused by other classes
using TreeLoader = _TreeLoader;
using KernelLoader = _KernelLoader<TreeLoader>;
......@@ -26,14 +32,18 @@ public:
using OctreeClass = typename TreeLoader::OctreeClass;
using KernelClass = typename KernelLoader::KernelClass;
/// FMM algorithm class
using FMMClass = FFmmAlgorithmThread<OctreeClass, CellClass, ContainerClass, KernelClass, LeafClass>;
/// The tree loader (FTreeLoader) that was used
TreeLoader& _treeLoader;
/// The kernel loader (FKernelLoader) that was used
KernelLoader& _kernelLoader;
bool _omp_static_schedule;
unsigned int _omp_chunk_size;
unsigned int _omp_chunk_size; ///< Chunk size for OpenMP
/// The #FMMClass algorithm instance
std::unique_ptr<FMMClass> _algo;
AlgoLoaderThread(FPerfTestParams& params,
......@@ -41,7 +51,6 @@ public:
KernelLoader& kernelLoader) :
_treeLoader(treeLoader),
_kernelLoader(kernelLoader),
_omp_static_schedule(params.omp_static_schedule),
_omp_chunk_size(params.omp_chunk_size),
_algo(nullptr) {
......
......@@ -80,6 +80,8 @@ namespace ParName {
int main (int argc, char** argv)
{
// Parameter handling //////////////
FHelpDescribeAndExit(argc, argv,
"Driver for Chebyshev interpolation kernel (1/r kernel).",
FParameterDefinitions::InputFile,
......@@ -99,10 +101,9 @@ int main (int argc, char** argv)
params.subTreeHeight = getValue(argc, argv, OctreeSubHeight.options, 2);
params.nbThreads = getValue(argc, argv, NbThreads.options, 1);
params.algo = getStr(argc,argv,ParName::Algo.options,"task");
params.omp_static_schedule =
getStr(argc,argv,ParName::Schedule.options,"dynamic") == std::string("static");
params.omp_chunk_size = getValue(argc, argv, ParName::ChunkSize.options, 0);
}
// End of Parameter handling ///////
omp_set_num_threads(params.nbThreads);
......
......@@ -21,8 +21,7 @@ struct FPerfTestParams {
int nbThreads = 1; ///< Maximum number of threads (when used).
std::string filename = ""; ///< Particles file.
std::string algo = "task"; ///< Algorithm to run.
bool omp_static_schedule = false; ///< OpenMP static or dynamic schedule.
int omp_chunk_size = 0;
int omp_chunk_size = 0; ///< OpenMP chunk size for basic algorithm (FFmmAlgorithmThread)
};
......
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