Class bi_tdgraph_allocator
Defined in File bi_tdgraph_allocator.hpp
Inheritance Relationships
Base Type
public rer::client< bi_tdgraph_allocator >
Class Documentation
-
class bi_tdgraph_allocator : public rer::client<bi_tdgraph_allocator>
Allocate a task from a cta::ds::bi_tdgraph according to a specified policy.
Public Functions
-
bi_tdgraph_allocator(const bi_tdgraph_allocator&) = delete
-
inline bi_tdgraph_allocator(const config::task_alloc_config *config, ds::bi_tdgraph *graph, rmath::rng *rng)
-
polled_task *operator()(const polled_task *current_task, size_t alloc_count) const
Allocate a task from a bi_tdgraph according to configuration.
- Parameters:
current_task – The most recently executed task (just finished).
alloc_count – The total # of task allocations so far.
-
bi_tdgraph_allocator &operator=(const bi_tdgraph_allocator&) = delete
Public Members
-
ds::bi_tdgraph *m_graph
-
rmath::rng *m_rng
-
const config::task_alloc_config *mc_config
Public Static Attributes
-
static const std::string kPolicyEplisonGreedy = "epsilon_greedy"
Allocate a task using the eplison-greedy method from Pini2012, Auer2002.
-
static const std::string kPolicyRandom = "random"
Allocate a task by choosing a random vertex within the graph and return it.
-
static const std::string kPolicyStochNBHD1 = "stoch_nbhd1"
Allocate a task using a stochastic neighborhood approach.
Take the task with the minimum execution time within a neighborhood, applying stochasticity to the task allocation process to attempt to make it more robust/flexible. A neighborhood is defined as all tasks reachable from the most recently executed task within some distance. For this method, that distance is set to 1.
-
static const std::string kPolicyStrictGreedy = "strict_greedy"
Allocate a task using a matroid optimization approach (strict greedy). No stochasticity is applied.
-
static const std::string kPolicyUCB1 = "UCB1"
Allocate a task using the UCB1 policy from Auer2002,Pini2012.
-
bi_tdgraph_allocator(const bi_tdgraph_allocator&) = delete