The control type provides a control model for specifying a set of control points as a coarse-grained control flow graph, with each node of the graph specifying a set of actions as a directed acyclic graph (DAG). More...
Classes | |
struct | action |
The action type provides a mechanism to add execution elements to the FleCSI control model. More... | |
Public Types | |
template<target_type T, control_points_enum CP> | |
using | meta = action< T, CP, true > |
An action registration on a meta_point for a specialization. | |
Static Public Member Functions | |
static int | check_status (int s) |
Process control model command-line options. | |
static int | execute () |
Perform the same operation as invoke with no arguments. | |
template<class... AA> | |
static int | invoke (AA &&... aa) |
Execute the control model. | |
static P & | state () |
Return the control policy object. | |
static void | write_actions (std::string_view p, const char *f) |
Write a Dot graph of the sorted sequence of actions. | |
static void | write_graph (std::string_view p, const char *f) |
Write a Dot graph of control points and actions. | |
The control type provides a control model for specifying a set of control points as a coarse-grained control flow graph, with each node of the graph specifying a set of actions as a directed acyclic graph (DAG).
The actions under a control point DAG are topologically sorted to respect dependency edges, which can be specified through the dag interface.
If Graphviz support is enabled, the control flow graph and its DAG nodes can be written to a graphviz file that can be compiled and viewed using the dot program.
P | policy type like control_policy |
using meta = action<T, CP, true> |
An action registration on a meta_point
for a specialization.
T | function |
CP | control point enumerator |
|
static |
Return the control policy object.
It is default-initialized when the control model is first used (typically to register an action) and destroyed at the end of the program. This function cannot be used if P
inherits from control_base
.
P
from control_base
and use the parameter passed to each action
|
static |
Execute the control model.
This method does a topological sort of the actions under each of the control points to determine a non-unique, but valid ordering, and executes the actions. An object of type P
is initialized from aa and passed to each action; it is destroyed before this function returns. control_base::exception
can be thrown for early termination. The control policy must inherit from control_base
and must not define a node_policy
, or the code will fail to compile.
control_base::exception
or 0
|
static |
Perform the same operation as invoke
with no arguments.
P
need not inherit from control_base
, if it does not, no object of it is created and actions are called with no arguments. P
may define node_policy
.
invoke()
if P
inherits from control_base
, otherwise the bitwise or of return values of executed actions invoke
directly or use runtime::control
.
|
static |
Process control model command-line options.
s | initialization status from initialize |
write_graph
or write_actions
as needed. status
|
static |
Write a Dot graph of control points and actions.
p | program name for graph title |
f | output file |
|
static |
Write a Dot graph of the sorted sequence of actions.
p | program name for graph title |
f | output file |