Commit 4a7fd13c authored by Quentin Khan's avatar Quentin Khan

Added doc to AlgoLoaderCostZones, AlgoLoaderThreadBalance and PerfTestUtils

parent 45a02075
......@@ -17,7 +17,9 @@
#include "BalanceTree/FCostZones.hpp"
/**
* \brief Algorithm loader for the CostZones algorithm.
* \brief Algorithm loader for FFmmAlgorithmThreadBalanced.
*
* See FAlgoLoader documentation.
*
* \warning : This loader requires that the KernelLoader supply a type definition
* for a `CostKernelClass`
......@@ -25,6 +27,9 @@
template <class _TreeLoader, template<typename> class _KernelLoader>
class AlgoLoaderCostZones : public FAlgoLoader<_TreeLoader, _KernelLoader> {
public:
// Types definitions
/// The TreeLoader type that is used.
using TreeLoader = _TreeLoader;
using KernelLoader = _KernelLoader<TreeLoader>;
......@@ -63,7 +68,7 @@ public:
/// Computes the tree cells costs then runs the costzones and FMM algorithms.
void run() {
// The tree loader holds the tree structure
OctreeClass* p_tree = &(_treeLoader._tree);
// Compute tree cells costs
......@@ -75,6 +80,7 @@ public:
std::cout << "Generating tree cost: " << this->time.elapsed() << "s.\n";
_infostring << "costgen:" << this->time.elapsed() << " ";
// Compute cost zones
FCostZones<OctreeClass, CellClass> costzones(p_tree, omp_get_max_threads());
this->time.tic();
......@@ -83,6 +89,7 @@ public:
std::cout << "Generating cost zones: " << this->time.elapsed() << "s.\n";
_infostring << "zonegen:" << this->time.elapsed() << " ";
// Execute FFM algorithm
this->time.tic();
_algo = std::unique_ptr<FMMClass>(
new FMMClass(p_tree, &(_kernelLoader._kernel),
......
......@@ -12,7 +12,11 @@
#include "Core/FFmmAlgorithmThreadBalance.hpp"
/**
* \brief An algorithm loader for FFmmAlgorithmBalance
*
* See FAlgoLoader documentation.
*/
template <class _TreeLoader, template<typename> class _KernelLoader>
class AlgoLoaderThreadBalance : public FAlgoLoader<_TreeLoader, _KernelLoader> {
public:
......
......@@ -47,9 +47,7 @@ struct FPerfTestParams {
*/
class FTreeLoader {
public:
/// A timer
/** Is used to time the loadTree method.
*/
/// A timer used to time the loadTree method.
FTic time;
protected:
......@@ -135,7 +133,8 @@ class FKernelLoader {
/// The tree loader that was used (see FTreeLoader).
using TreeLoader = _TreeLoader;
public:
FTic time;
/// A timer
FTic time;
};
/**
......@@ -169,8 +168,16 @@ class FAlgoLoader {
public:
/// A timer.
FTic time;
/// Method that runs the algorithm.
virtual void run() = 0;
/// Additionnal information for specific algorithm loader.
/**
* The string should be formated as a key:value list separated by spaces.
* For instance : "key1:value1 key2:value2 ". It may be a good idea to add a
* space at the end of the string.
*/
virtual std::string getRunInfoString() const {
return "";
}
......
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