Skip to main content

class abstract_scheduler

Declaration

class abstract_scheduler { /* full declaration omitted */ };

Member Variables

std::unique_ptr<command_graph> m_cdag
command_recorder* m_crec
std::unique_ptr<command_graph_generator> m_cggen
std::unique_ptr<instruction_graph> m_idag
instruction_recorder* m_irec
std::unique_ptr<instruction_graph_generator> m_iggen
double_buffered_queue<event> m_event_queue

Member Aliases

  • using delegate = instruction_graph_generator::delegate;
  • using event = std::variant<event_task_available, event_buffer_created, event_buffer_debug_name_changed, event_buffer_destroyed, event_host_object_created, event_host_object_destroyed, event_epoch_reached, event_test_inspect>;

Member Function Overview

Member Functions

abstract_scheduler(size_t num_nodes,
                   node_id local_node_id,
                   const system_info& system_info,
                   const task_manager& tm,
                   delegate* delegate,
                   command_recorder* crec,
                   instruction_recorder* irec,
                   const policy_set& policy = {})

Parameters

size_t num_nodes
node_id local_node_id
const system_info& system_info
const task_manager& tm
delegate* delegate
command_recorder* crec
instruction_recorder* irec
const policy_set& policy = {}

abstract_scheduler(const abstract_scheduler&)

Parameters

const abstract_scheduler&

abstract_scheduler(abstract_scheduler&&)

Parameters

abstract_scheduler&&

void notify_buffer_created(
    buffer_id bid,
    const range<3>& range,
    size_t elem_size,
    size_t elem_align,
    allocation_id user_allocation_id)

Parameters

buffer_id bid
const range<3>& range
size_t elem_size
size_t elem_align
allocation_id user_allocation_id

void notify_buffer_debug_name_changed(
    buffer_id bid,
    const std::string& name)

Parameters

buffer_id bid
const std::string& name

void notify_buffer_destroyed(buffer_id bid)

Parameters

buffer_id bid

void notify_epoch_reached(task_id tid)

Parameters

task_id tid

void notify_host_object_created(
    host_object_id hoid,
    bool owns_instance)

Parameters

host_object_id hoid
bool owns_instance

void notify_host_object_destroyed(
    host_object_id hoid)

Parameters

host_object_id hoid

void notify_task_created(const task* tsk)

Description

Notifies the scheduler that a new task has been created and is ready for scheduling.

Parameters

const task* tsk

abstract_scheduler& operator=(
    const abstract_scheduler&)

Parameters

const abstract_scheduler&

abstract_scheduler& operator=(
    abstract_scheduler&&)

Parameters

abstract_scheduler&&

virtual ~abstract_scheduler()


void schedule()

Description

This is called by the worker thread.


void notify(event&& evt)

Parameters

event&& evt