Commit e151e197 authored by Quentin Khan's avatar Quentin Khan

Protect StarPU algorithm usage with preprocessor guards

In files that may be used without StarPU.
parent 61d70fe1
......@@ -58,7 +58,11 @@
#include "Adaptive/FAdaptiveSequential.hpp"
#include "Adaptive/FAdaptiveTask.hpp"
#ifdef SCALFMM_USE_STARPU
#include "Adaptive/FAdaptiveStarPU.hpp"
#endif
#include "Adaptive/FTree.hpp"
......@@ -76,9 +80,12 @@ using LeafClass = typename OctreeClass::node_t;
using MatrixKernelClass = FInterpMatrixKernelR<FReal>;
using KernelClass = FAdaptUnifKernel<FReal, CellClass, ContainerClass, MatrixKernelClass, ORDER>;
//
using FmmClass = FAdaptiveTask<OctreeClass, KernelClass>;
using FmmClass = FAdaptiveTask<OctreeClass, KernelClass>;
using FmmClassSeq = FAdaptiveSequential<OctreeClass, KernelClass>;
using FmmClassStarPU = FAdaptiveStarPU<OctreeClass, KernelClass>;
#ifdef SCALFMM_USE_STARPU
using FmmClassStarPU = FAdaptiveStarPU<OctreeClass, KernelClass>;
#endif
namespace FPD = FParameterDefinitions;
namespace FParameterDefinitions {
......@@ -186,9 +193,11 @@ int main(int argc, char* argv[]) {
if(FParameters::existParameter(argc, argv, FPD::UseSequential.options)) {
FmmClassSeq algo(&tree, &kernel);
algo.execute(operations); // FMM algorithm call
#ifdef SCALFMM_USE_STARPU
} else if(FParameters::existParameter(argc, argv, FPD::UseStarPU.options)) {
FmmClassStarPU algo(&tree, &kernel);
algo.execute(operations); // FMM algorithm call
#endif
} else {
FmmClass algo(&tree, &kernel);
algo.execute(operations); // FMM algorithm call
......
......@@ -245,6 +245,8 @@ template<typename FReal> struct algo_descriptor<FReal, 6> {
// StarPU adaptive fmm algorithm
#ifdef SCALFMM_USE_STARPU
#include "Adaptive/FAdaptiveStarPU.hpp"
template<typename FReal> struct algo_descriptor<FReal, 7> {
constexpr static const char* name = "adaptive-starpu";
......@@ -267,5 +269,6 @@ template<typename FReal> struct algo_descriptor<FReal, 7> {
};
};
#endif // SCALFMM_USE_STARPU
#endif /* _ALGO_DESCRIPTORS_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