Peano
Loading...
Searching...
No Matches
Configuration.h
Go to the documentation of this file.
1// This file is part of the Peano project. For conditions of distribution and
2// use, please see the copyright notice at www.peano-framework.org
3#pragma once
4
5
6#include "State.h"
7#include "peano4/grid/grid.h"
8
9
10namespace toolbox {
11 namespace loadbalancing {
12 class Configuration;
13 class DefaultConfiguration;
14 }
15}
16
17
29 public:
30 virtual ~Configuration() = default;
31
38
49
54
56
60 virtual int getMinTreeSize(State state) = 0;
61
62 virtual std::string toString() const;
63};
64
65
67 private:
69 public:
76 DefaultConfiguration(int maxTreesPerRank=0);
77
78 virtual bool makeSplitDependOnMemory(State state) override;
79
80 virtual int getMaxLocalTreesPerRank(State state) override;
81
82 virtual double getWorstCaseBalancingRatio(State state) override;
83
84 virtual int getMinTreeSize(State state) override;
85
87};
AutomatonState state
Abstract interface to tweak the behaviour of the recursive subdivision.
virtual peano4::SplitInstruction::Mode getMode(State state)=0
virtual std::string toString() const
virtual int getMaxLocalTreesPerRank(State state)=0
Constraint on the number of trees per rank.
virtual double getWorstCaseBalancingRatio(State state)=0
Control when to balance between ranks.
virtual int getMinTreeSize(State state)=0
Minimum tree size.
virtual bool makeSplitDependOnMemory(State state)=0
Use the operating system's memory queries to get the memory out and to veto too many local splits.
virtual int getMaxLocalTreesPerRank(State state) override
Constraint on the number of trees per rank.
virtual bool makeSplitDependOnMemory(State state) override
Use the operating system's memory queries to get the memory out and to veto too many local splits.
DefaultConfiguration(int maxTreesPerRank=0)
Create default configuration.
virtual peano4::SplitInstruction::Mode getMode(State state) override
virtual int getMinTreeSize(State state) override
Minimum tree size.
virtual double getWorstCaseBalancingRatio(State state) override
Control when to balance between ranks.
State
State descriptor of load balancing.
Definition State.h:22