Skip to main content

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

Member Functions

void add_dependency(instruction_id iid)

Parameters

instruction_id iid

const edge_set& get_dependencies() const


instruction_id get_id() const


int get_priority() const


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