Class bi_tdgraph

Inheritance Relationships

Base Types

  • public cosm::ta::ds::tdgraph (Class tdgraph)

  • public rer::client< bi_tdgraph >

Class Documentation

class bi_tdgraph : public cosm::ta::ds::tdgraph, public rer::client<bi_tdgraph>

Representation of an overall task (the root task) as a BINARY tree representing the task decomposition of the root task at different granularities (i.e. tasks of different levels of complexity).

Public Functions

bi_tdgraph(const bi_tdgraph&) = default
explicit bi_tdgraph(const config::task_alloc_config *config)
inline void active_tab(bi_tab *active_tab)
inline bi_tab *active_tab(void)
inline const bi_tab *active_tab(void) const

Get the active TAB for the graph.

inline int active_tab_id(void) const

Return a uuid for the active TAB (really just an index in the vector of TABs) or -1 if no active TAB.

void active_tab_init(const std::string &method, rmath::rng *rng)
void active_tab_update(const polled_task *current_task, rmath::rng *rng)

Update the active TAB BEFORE task allocation is performed in the executive that owns this graph.

Parameters:
  • current_task – The current task that just finished/aborted/whatever.

  • rng – A random number generator for use in update calculations.

status_t install_tab(const std::string &parent, tdgraph::vertex_vector children, rmath::rng *rng)
status_t install_tab(polled_task *parent, tdgraph::vertex_vector children, rmath::rng *rng)

Set the children for an existing node.

Do not call tdgraph::set_children() directly, or your bi_tdgraph will not work properly.

Parameters:
  • parent – The parent node, which MUST be partitionable.

  • children – The list of children (must be exactly 2) to associate with the parent.

  • rng – The RNG to use during installation, per configuration.

Returns:

status_t.

bi_tdgraph &operator=(const bi_tdgraph&) = delete
bi_tab *root_tab(void)
const bi_tab *root_tab(void) const
bi_tab *tab_child(const bi_tab *tab, const polled_task *current_task)

Get the child tab for the argument (i.e. the TAB whose root is the left/right child of the argument)

Parameters:
  • tab – The tab.

  • current_task – The current active task in the tab.

const bi_tab *tab_parent(const bi_tab *tab) const

Get the parent TAB for the argument (i.e. the TAB which has as a child the root of the TAB argument).

Public Static Attributes

static const std::string kTABInitMaxDepth = "max_depth"
static const std::string kTABInitRandom = "random"
static const std::string kTABInitRoot = "root"