@@ -220,7 +220,7 @@ void distributed_graph_generator::generate_distributed_commands(const task& tsk)
220220 // we have to include it in exactly one of the per-node intermediate reductions.
221221 for (const auto & reduction : tsk.get_reductions ()) {
222222 if (nid == reduction_initializer_nid && reduction.init_from_buffer ) {
223- static_cast <execution_command* >(cmd)->set_is_reduction_initializer (true );
223+ utils::as <execution_command>(cmd)->set_is_reduction_initializer (true );
224224 break ;
225225 }
226226 }
@@ -313,7 +313,7 @@ void distributed_graph_generator::generate_distributed_commands(const task& tsk)
313313 // possibly even multiple for partially already-replicated data.
314314 // TODO: Can and/or should we consolidate?
315315 auto * const push_cmd = create_command<push_command>(bid, 0 , nid, trid, grid_box_to_subrange (replicated_box));
316- assert (!isa<await_push_command>(m_cdag.get (wcs)) && " Attempting to push non-owned data?!" );
316+ assert (!utils:: isa<await_push_command>(m_cdag.get (wcs)) && " Attempting to push non-owned data?!" );
317317 m_cdag.add_dependency (push_cmd, m_cdag.get (wcs), dependency_kind::true_dep, dependency_origin::dataflow);
318318 generated_pushes.push_back (push_cmd);
319319
@@ -450,13 +450,13 @@ void distributed_graph_generator::generate_distributed_commands(const task& tsk)
450450 assert (writer_cmd != nullptr );
451451
452452 // We're only interested in writes that happen within the same task as the push
453- if (isa<task_command>(writer_cmd) && static_cast <task_command* >(writer_cmd)->get_tid () == tsk.get_id ()) {
453+ if (utils:: isa<task_command>(writer_cmd) && utils::as <task_command>(writer_cmd)->get_tid () == tsk.get_id ()) {
454454 // In certain situations the push might have a true dependency on the last writer,
455455 // in that case don't add an anti-dependency (as that would cause a cycle).
456456 // TODO: Is this still possible? We don't have a unit test exercising this branch...
457457 if (push_cmd->has_dependency (writer_cmd, dependency_kind::true_dep)) {
458458 // This can currently only happen for await_push commands.
459- assert (isa<await_push_command>(writer_cmd));
459+ assert (utils:: isa<await_push_command>(writer_cmd));
460460 continue ;
461461 }
462462 m_cdag.add_dependency (writer_cmd, push_cmd, dependency_kind::anti_dep, dependency_origin::dataflow);
@@ -495,7 +495,7 @@ void distributed_graph_generator::generate_anti_dependencies(
495495 const auto last_writers = last_writers_map.get_region_values (write_req);
496496 for (const auto & [box, wcs] : last_writers) {
497497 auto * const last_writer_cmd = m_cdag.get (static_cast <command_id>(wcs));
498- assert (!isa<task_command>(last_writer_cmd) || static_cast <task_command* >(last_writer_cmd)->get_tid () != tid);
498+ assert (!utils:: isa<task_command>(last_writer_cmd) || utils::as <task_command>(last_writer_cmd)->get_tid () != tid);
499499
500500 // Add anti-dependencies onto all successors of the writer
501501 bool has_successors = false ;
@@ -506,7 +506,7 @@ void distributed_graph_generator::generate_anti_dependencies(
506506 auto * const cmd = d.node ;
507507
508508 // We might have already generated new commands within the same task that also depend on this; in that case, skip it
509- if (isa<task_command>(cmd) && static_cast <task_command* >(cmd)->get_tid () == tid) continue ;
509+ if (utils:: isa<task_command>(cmd) && utils::as <task_command>(cmd)->get_tid () == tid) continue ;
510510
511511 // So far we don't know whether the dependent actually intersects with the subrange we're writing
512512 if (const auto command_reads_it = m_command_buffer_reads.find (cmd->get_cid ()); command_reads_it != m_command_buffer_reads.end ()) {
@@ -549,7 +549,7 @@ void distributed_graph_generator::process_task_side_effect_requirements(const ta
549549
550550void distributed_graph_generator::set_epoch_for_new_commands (const abstract_command* const epoch_or_horizon) {
551551 // both an explicit epoch command and an applied horizon can be effective epochs
552- assert (isa<epoch_command>(epoch_or_horizon) || isa<horizon_command>(epoch_or_horizon));
552+ assert (utils:: isa<epoch_command>(epoch_or_horizon) || utils:: isa<horizon_command>(epoch_or_horizon));
553553
554554 for (auto & [bid, bs] : m_buffer_states) {
555555 bs.local_last_writer .apply_to_values ([epoch_or_horizon](const write_command_state& wcs) {
0 commit comments