class command_graph_generator
Declaration
class command_graph_generator { /* full declaration omitted */ };
Member Variables
- size_t m_num_nodes
- node_id m_local_nid
- policy_set m_policy
- command_graph& m_cdag
- const task_manager& m_task_mngr
- std::unordered_map<buffer_id, buffer_state> m_buffers
- std::unordered_map<host_object_id, host_object_state> m_host_objects
- command_id m_epoch_for_new_commands = 0
- command_id m_epoch_last_pruned_before = 0
- command_id m_current_horizon = no_command
- command_set m_current_cmd_batch
- std::vector<reduction_id> m_completed_reductions
- std::unordered_map<command_id, buffer_read_map> m_command_buffer_reads
- std::unordered_map<collective_group_id, command_id> m_last_collective_commands
- detail::command_recorder* m_recorder = nullptr
- static const write_command_state no_command = celerity::detail::write_command_state(static_cast<celerity::detail::command_id>(-1))
Member Aliases
- using buffer_read_map = std::unordered_map<buffer_id, region<3>>;
Member Function Overview
- build_task(const task & tsk) → command_set
- command_graph_generator(size_t num_nodes, node_id local_nid, command_graph & cdag, const task_manager & tm, detail::command_recorder * recorder, const policy_set & policy = default_policy_set())
- get_command_graph() → command_graph &
- notify_buffer_created(buffer_id bid, const range<3> & range, bool host_initialized) → void
- notify_buffer_debug_name_changed(buffer_id bid, const std::string & debug_name) → void
- notify_buffer_destroyed(buffer_id bid) → void
- notify_host_object_created(host_object_id hoid) → void
- notify_host_object_destroyed(host_object_id hoid) → void
- template <typename T, typename... Args>
create_command(Args &&... args) → T * - default_policy_set() → static constexpr policy_set
- generate_anti_dependencies(task_id tid, buffer_id bid, const region_map<write_command_state> & last_writers_map, const region<3> & write_req, abstract_command * write_cmd) → void
- generate_distributed_commands(const task & tsk) → void
- generate_epoch_command(const task & tsk) → void
- generate_epoch_dependencies(abstract_command * cmd) → void
- generate_horizon_command(const task & tsk) → void
- print_buffer_debug_label(buffer_id bid) const → std::string
- process_task_side_effect_requirements(const task & tsk) → void
- prune_commands_before(command_id epoch) → void
- reduce_execution_front_to(abstract_command * new_front) → void
- report_overlapping_writes(const task & tsk, const box_vector<3> & local_chunks) const → void
- set_epoch_for_new_commands(const abstract_command * epoch_or_horizon) → void
Member Functions
¶command_set build_task(const task& tsk)
command_set build_task(const task& tsk)
Parameters
- const task& tsk
¶command_graph_generator(
size_t num_nodes,
node_id local_nid,
command_graph& cdag,
const task_manager& tm,
detail::command_recorder* recorder,
const policy_set& policy =
default_policy_set())
command_graph_generator(
size_t num_nodes,
node_id local_nid,
command_graph& cdag,
const task_manager& tm,
detail::command_recorder* recorder,
const policy_set& policy =
default_policy_set())
Parameters
- size_t num_nodes
- node_id local_nid
- command_graph& cdag
- const task_manager& tm
- detail::command_recorder* recorder
- const policy_set& policy = default_policy_set()
¶command_graph& get_command_graph()
command_graph& get_command_graph()
¶void notify_buffer_created(buffer_id bid,
const range<3>& range,
bool host_initialized)
void notify_buffer_created(buffer_id bid,
const range<3>& range,
bool host_initialized)
Parameters
¶void notify_buffer_debug_name_changed(
buffer_id bid,
const std::string& debug_name)
void notify_buffer_debug_name_changed(
buffer_id bid,
const std::string& debug_name)
Parameters
- buffer_id bid
- const std::string& debug_name
¶void notify_buffer_destroyed(buffer_id bid)
void notify_buffer_destroyed(buffer_id bid)
Parameters
- buffer_id bid
¶void notify_host_object_created(
host_object_id hoid)
void notify_host_object_created(
host_object_id hoid)
Parameters
- host_object_id hoid
¶void notify_host_object_destroyed(
host_object_id hoid)
void notify_host_object_destroyed(
host_object_id hoid)
Parameters
- host_object_id hoid
¶template <typename T, typename... Args>
T* create_command(Args&&... args)
template <typename T, typename... Args>
T* create_command(Args&&... args)
Template Parameters
- T
- Args
Parameters
- Args&&... args
¶static constexpr policy_set default_policy_set()
static constexpr policy_set default_policy_set()
¶void generate_anti_dependencies(
task_id tid,
buffer_id bid,
const region_map<write_command_state>&
last_writers_map,
const region<3>& write_req,
abstract_command* write_cmd)
void generate_anti_dependencies(
task_id tid,
buffer_id bid,
const region_map<write_command_state>&
last_writers_map,
const region<3>& write_req,
abstract_command* write_cmd)
Parameters
- task_id tid
- buffer_id bid
- const region_map<write_command_state>& last_writers_map
- const region<3>& write_req
- abstract_command* write_cmd
¶void generate_distributed_commands(
const task& tsk)
void generate_distributed_commands(
const task& tsk)
Description
Generates command(s) that need to be processed by every node in the system, because they may require data transfers.
Parameters
- const task& tsk
¶void generate_epoch_command(const task& tsk)
void generate_epoch_command(const task& tsk)
Parameters
- const task& tsk
¶void generate_epoch_dependencies(
abstract_command* cmd)
void generate_epoch_dependencies(
abstract_command* cmd)
Parameters
- abstract_command* cmd
¶void generate_horizon_command(const task& tsk)
void generate_horizon_command(const task& tsk)
Parameters
- const task& tsk
¶std::string print_buffer_debug_label(
buffer_id bid) const
std::string print_buffer_debug_label(
buffer_id bid) const
Parameters
- buffer_id bid
¶void process_task_side_effect_requirements(
const task& tsk)
void process_task_side_effect_requirements(
const task& tsk)
Parameters
- const task& tsk
¶void prune_commands_before(command_id epoch)
void prune_commands_before(command_id epoch)
Parameters
- command_id epoch
¶void reduce_execution_front_to(
abstract_command* new_front)
void reduce_execution_front_to(
abstract_command* new_front)
Parameters
- abstract_command* new_front
¶void report_overlapping_writes(
const task& tsk,
const box_vector<3>& local_chunks) const
void report_overlapping_writes(
const task& tsk,
const box_vector<3>& local_chunks) const
Parameters
- const task& tsk
- const box_vector<3>& local_chunks
¶void set_epoch_for_new_commands(
const abstract_command* epoch_or_horizon)
void set_epoch_for_new_commands(
const abstract_command* epoch_or_horizon)
Parameters
- const abstract_command* epoch_or_horizon