class live_executor
Declaration
class live_executor : public executor { /* full declaration omitted */ };
Description
Executor implementation for a normal (non-dry) run of a Celerity application. Internal instruction dependencies are resolved by means of an out_of_order_engine and receive_arbiter, and the resulting operations dispatched to a backend
and communicator
implementation.
Declared at: include/live_executor.h:47
Inherits from: executor
Member Variables
- std::unique_ptr<communicator> m_root_comm
- double_buffered_queue< live_executor_detail::submission> m_submission_queue
- std::unique_ptr<impl> m_impl
- std::thread m_thread
Member Function Overview
- get_active_time() const → std::chrono::nanoseconds
- get_starvation_time() const → std::chrono::nanoseconds
- live_executor(std::unique_ptr<backend> backend, std::unique_ptr<communicator> root_comm, executor::delegate * dlg, const policy_set & policy = default_policy_set()) → explicit
- live_executor(const live_executor &)
- live_executor(live_executor &&)
- notify_scheduler_idle(bool is_idle) → void
- operator=(const live_executor &) → live_executor &
- operator=(live_executor &&) → live_executor &
- submit(std::vector<const instruction *> instructions, std::vector<outbound_pilot> pilots) → void
- track_host_object_instance(host_object_id hoid, std::unique_ptr<host_object_instance> instance) → void
- track_reducer(reduction_id rid, std::unique_ptr<reducer> reducer) → void
- track_user_allocation(allocation_id aid, void * ptr) → void
- ~live_executor()
- default_policy_set() → static constexpr policy_set
- thread_main() → void
Inherited from executor:
- public get_active_time
- public get_starvation_time
- public notify_scheduler_idle
- public operator=
- public operator=
- public submit
- public track_host_object_instance
- public track_reducer
- public track_user_allocation
Member Functions
¶std::chrono::nanoseconds get_active_time() const
std::chrono::nanoseconds get_active_time() const
Description
Returns the total time the executor has spent processing instructions.
Declared at: include/live_executor.h:75
¶std::chrono::nanoseconds get_starvation_time()
const
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/live_executor.h:73
¶explicit live_executor(
std::unique_ptr<backend> backend,
std::unique_ptr<communicator> root_comm,
executor::delegate* dlg,
const policy_set& policy =
default_policy_set())
explicit live_executor(
std::unique_ptr<backend> backend,
std::unique_ptr<communicator> root_comm,
executor::delegate* dlg,
const policy_set& policy =
default_policy_set())
Description
Operations are dispatched to backend
and root_comm
or one of its clones. dlg
(optional) receives notifications about reached horizons and epochs from the executor thread.
Declared at: include/live_executor.h:55
Parameters
- std::unique_ptr<backend> backend
- std::unique_ptr<communicator> root_comm
- executor::delegate* dlg
- const policy_set& policy = default_policy_set()
¶live_executor(const live_executor&)
live_executor(const live_executor&)
Declared at: include/live_executor.h:58
Parameters
- const live_executor&
¶live_executor(live_executor&&)
live_executor(live_executor&&)
Declared at: include/live_executor.h:59
Parameters
¶void notify_scheduler_idle(bool is_idle)
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/live_executor.h:71
Parameters
- bool is_idle
¶live_executor& operator=(const live_executor&)
live_executor& operator=(const live_executor&)
Declared at: include/live_executor.h:60
Parameters
- const live_executor&
¶live_executor& operator=(live_executor&&)
live_executor& operator=(live_executor&&)
Declared at: include/live_executor.h:61
Parameters
¶void submit(
std::vector<const instruction*> instructions,
std::vector<outbound_pilot> pilots)
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/live_executor.h:69
Parameters
- std::vector<const instruction*> instructions
- std::vector<outbound_pilot> pilots
¶void track_host_object_instance(
host_object_id hoid,
std::unique_ptr<host_object_instance>
instance)
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/live_executor.h:66
Parameters
- host_object_id hoid
- std::unique_ptr<host_object_instance> instance
¶void track_reducer(
reduction_id rid,
std::unique_ptr<reducer> reducer)
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/live_executor.h:67
Parameters
- reduction_id rid
- std::unique_ptr<reducer> reducer
¶void track_user_allocation(allocation_id aid,
void* ptr)
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/live_executor.h:65
Parameters
- allocation_id aid
- void* ptr
¶~live_executor()
~live_executor()
Description
Waits until an epoch with epoch_action::shutdown
has executed and the executor thread has exited.
Declared at: include/live_executor.h:63
¶static constexpr policy_set default_policy_set()
static constexpr policy_set default_policy_set()
Description
Default-constructs a policy_set
- this must be a function because we can't use the implicit default constructor of policy_set
, which has member initializers, within its surrounding class (Clang diagnostic).
Declared at: include/live_executor.h:91
¶void thread_main()
void thread_main()
Declared at: include/live_executor.h:87