class executor
Declaration
class executor { /* full declaration omitted */ };
Description
An executor processes receives and processes an instruction stream to process in a background thread.
Declared at: include/executor.h:18
Member Function Overview
- executor()
- executor(const executor &)
- executor(executor &&)
- get_active_time() const → virtual std::chrono::nanoseconds
- get_starvation_time() const → virtual std::chrono::nanoseconds
- notify_scheduler_idle(bool is_idle) → virtual void
- operator=(const executor &) → executor &
- operator=(executor &&) → executor &
- submit(std::vector<const instruction *> instructions, std::vector<outbound_pilot> pilots) → virtual void
- track_host_object_instance(host_object_id hoid, std::unique_ptr<host_object_instance> instance) → virtual void
- track_reducer(reduction_id rid, std::unique_ptr<reducer> reducer) → virtual void
- track_user_allocation(allocation_id aid, void * ptr) → virtual void
- ~executor() → virtual
Member Functions
¶executor()
executor()
Declared at: include/executor.h:38
¶executor(const executor&)
executor(const executor&)
Declared at: include/executor.h:39
Parameters
- const executor&
¶executor(executor&&)
executor(executor&&)
Declared at: include/executor.h:40
Parameters
- executor&&
¶virtual std::chrono::nanoseconds get_active_time()
const
virtual std::chrono::nanoseconds get_active_time()
const
Description
Returns the total time the executor has spent processing instructions.
Declared at: include/executor.h:73
¶virtual std::chrono::nanoseconds
get_starvation_time() const
virtual std::chrono::nanoseconds
get_starvation_time() const
Description
Returns the total time the executor has spent idle waiting for instructions while the scheduler was busy.
Declared at: include/executor.h:70
¶virtual void notify_scheduler_idle(bool is_idle)
virtual void notify_scheduler_idle(bool is_idle)
Description
Informs the executor about a change of the scheduler idle state. Required for tracking starvation time.
Declared at: include/executor.h:67
Parameters
- bool is_idle
¶executor& operator=(const executor&)
executor& operator=(const executor&)
Declared at: include/executor.h:41
Parameters
- const executor&
¶executor& operator=(executor&&)
executor& operator=(executor&&)
Declared at: include/executor.h:42
Parameters
- executor&&
¶virtual void submit(
std::vector<const instruction*> instructions,
std::vector<outbound_pilot> pilots)
virtual void submit(
std::vector<const instruction*> instructions,
std::vector<outbound_pilot> pilots)
Description
Submits a list of instructions to execute once their dependencies have been fulfilled, and a list of outbound pilots to be transmitted to their recipients as soon as possible. Instructions must be in topological order of dependencies, as must be the concatenation of all vectors passed to subsequent invocations of this function.
Declared at: include/executor.h:64
Parameters
- std::vector<const instruction*> instructions
- std::vector<outbound_pilot> pilots
¶virtual void track_host_object_instance(
host_object_id hoid,
std::unique_ptr<host_object_instance>
instance)
virtual void track_host_object_instance(
host_object_id hoid,
std::unique_ptr<host_object_instance>
instance)
Description
Transfer ownership of a host object instance to the executor. The executor will later destroy this instance when executing a matching destroy_host_object_instruction.
Declared at: include/executor.h:54
Parameters
- host_object_id hoid
- std::unique_ptr<host_object_instance> instance
¶virtual void track_reducer(
reduction_id rid,
std::unique_ptr<reducer> reducer)
virtual void track_reducer(
reduction_id rid,
std::unique_ptr<reducer> reducer)
Description
Informs the executor about the runtime behavior of a reduction. Will be used by any fill_identity_instruction and reduce_instruction later submitted on the same reduction_id. Reducer instances are removed from executor tracking and destroyed when they later appear in an instruction_garbage list attached to a horizon or epoch instruction.
Declared at: include/executor.h:59
Parameters
- reduction_id rid
- std::unique_ptr<reducer> reducer
¶virtual void track_user_allocation(
allocation_id aid,
void* ptr)
virtual void track_user_allocation(
allocation_id aid,
void* ptr)
Description
Informs the executor about the runtime address of an allocation on user_memory_id. Must be called before submitting any instruction referring to the allocation id in question. User allocations are later removed from executor tracking as they appear in an instruction_garbage list attached to a horizon or epoch instruction.
Declared at: include/executor.h:50
Parameters
- allocation_id aid
- void* ptr
¶virtual ~executor()
virtual ~executor()
Description
Waits until an epoch with epoch_action::shutdown
has executed and the executor thread has exited.
Declared at: include/executor.h:45