Commit 87ff6caa authored by Quentin Khan's avatar Quentin Khan

AlgoLoaderCostZones: private repo config

AlgoLoaderTask: private repo config
AlgoLoaderThread: private repo config
KernelLoaderFChebSym: private repo config
TreeLoaderFCheb: private repo config
parent 8c8d1eba
// ==== CMAKE ====
// Keep in private GIT
// @SCALFMM_PRIVATE
#ifndef _ALGOLOADERCOSTZONES_HPP_
#define _ALGOLOADERCOSTZONES_HPP_
#include <memory>
#include <sstream>
#include "PerfTestUtils.hpp"
#include "Core/FFmmAlgorithm.hpp"
......@@ -37,15 +44,20 @@ public:
using CostFmmClass = FFmmAlgorithm
<OctreeClass, CellClass, ContainerClass, CostKernelClass, LeafClass>;
std::stringstream _infostring;
TreeLoader& _treeLoader;
KernelLoader& _kernelLoader;
std::unique_ptr<FMMClass> _algo;
/// Builds the loader
AlgoLoaderCostZones(FPerfTestParams& /*params*/,
TreeLoader& treeLoader,
KernelLoader& kernelLoader) :
_treeLoader(treeLoader),
_kernelLoader(kernelLoader) {
_kernelLoader(kernelLoader),
_algo(nullptr) {
}
......@@ -61,6 +73,7 @@ public:
costAlgo.execute();
this->time.tac();
std::cout << "Generating tree cost: " << this->time.elapsed() << "s.\n";
_infostring << "costgen:" << this->time.elapsed() << " ";
FCostZones<OctreeClass, CellClass> costzones(p_tree, omp_get_max_threads());
......@@ -68,13 +81,19 @@ public:
costzones.run();
this->time.tac();
std::cout << "Generating cost zones: " << this->time.elapsed() << "s.\n";
_infostring << "zonegen:" << this->time.elapsed() << " ";
this->time.tic();
FMMClass algo(p_tree, &(_kernelLoader._kernel), costzones.getZoneBounds(), costzones.getLeafZoneBounds());
algo.execute();
_algo = std::unique_ptr<FMMClass>(
new FMMClass(p_tree, &(_kernelLoader._kernel),
costzones.getZoneBounds(), costzones.getLeafZoneBounds()));
_algo->execute();
this->time.tac();
}
std::string getRunInfoString() const {
return _infostring.str();
}
};
......
// ==== CMAKE ====
// Keep in private GIT
// @SCALFMM_PRIVATE
#ifndef _ALGOLOADERTASK_HPP_
#define _ALGOLOADERTASK_HPP_
#include <memory>
#include "PerfTestUtils.hpp"
#include "Core/FFmmAlgorithmTask.hpp"
......@@ -25,18 +31,22 @@ public:
TreeLoader& _treeLoader;
KernelLoader& _kernelLoader;
std::unique_ptr<FMMClass> _algo;
AlgoLoaderTask(FPerfTestParams& /*params*/,
TreeLoader& treeLoader,
KernelLoader& kernelLoader) :
_treeLoader(treeLoader),
_kernelLoader(kernelLoader) {
_kernelLoader(kernelLoader),
_algo(nullptr) {
}
void run() {
FMMClass algo(&(_treeLoader._tree), &(_kernelLoader._kernel));
algo.execute();
_algo = std::unique_ptr<FMMClass>(
new FMMClass(&(_treeLoader._tree), &(_kernelLoader._kernel)));
_algo->execute();
}
};
......
// ==== CMAKE ====
// Keep in private GIT
// @SCALFMM_PRIVATE
#ifndef _ALGOLOADERTHREAD_HPP_
#define _ALGOLOADERTHREAD_HPP_
#include <memory>
#include "PerfTestUtils.hpp"
#include "Core/FFmmAlgorithmThread.hpp"
......@@ -26,20 +32,24 @@ public:
bool _omp_static_schedule;
std::unique_ptr<FMMClass> _algo;
AlgoLoaderThread(FPerfTestParams& params,
TreeLoader& treeLoader,
KernelLoader& kernelLoader) :
_treeLoader(treeLoader),
_kernelLoader(kernelLoader),
_omp_static_schedule(params.omp_static_schedule) {
_omp_static_schedule(params.omp_static_schedule),
_algo(nullptr) {
}
void run() {
FMMClass algo(&(_treeLoader._tree), &(_kernelLoader._kernel),
_omp_static_schedule);
algo.execute();
_algo = std::unique_ptr<FMMClass>(
new FMMClass(&(_treeLoader._tree), &(_kernelLoader._kernel),
_omp_static_schedule));
_algo->execute();
}
};
......
// ==== CMAKE ====
// Keep in private GIT
// @SCALFMM_PRIVATE
#ifndef _KERNELLOADERFCHEBSYM_HPP_
#define _KERNELLOADERFCHEBSYM_HPP_
......
// ==== CMAKE ====
// Keep in private GIT
// @SCALFMM_PRIVATE
#ifndef _TREELOADERFCHEB_HPP_
#define _TREELOADERFCHEB_HPP_
......
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