class instruction
Declaration
class instruction : public acceptor { /* full declaration omitted */ };
Description
A node in the instruction_graph
. This is not implemented as an intrusive_graph
but references its predecessors by id to avoid thread-safety and lifetime issues.
Inherits from: acceptor
Member Variables
- instruction_id m_id
- int m_priority
- edge_set m_dependencies
Member Aliases
- using edge_set = gch::small_vector<instruction_id>;
Member Function Overview
- add_dependency(instruction_id iid) → void
- get_dependencies() const → const edge_set &
- get_id() const → instruction_id
- get_priority() const → int
- instruction(instruction_id iid, int priority) → explicit
Member Functions
¶void add_dependency(instruction_id iid)
void add_dependency(instruction_id iid)
Parameters
- instruction_id iid
¶const edge_set& get_dependencies() const
const edge_set& get_dependencies() const
¶instruction_id get_id() const
instruction_id get_id() const
¶int get_priority() const
int get_priority() const
¶explicit instruction(instruction_id iid,
int priority)
explicit instruction(instruction_id iid,
int priority)
Description
If there are multiple instructions eligible for execution, the runtime should chose the one with the highest priority
first. This provides a low-level scheduling heuristic to reduce the impact of submission latency and improve concurrency.
Parameters
- instruction_id iid
- int priority