- selected_task->set_host(selected_host);
- // we can also set the destination of all the input comms of the selected task
- for (const auto& pred : selected_task->get_dependencies()) {
- auto* comm = dynamic_cast<simgrid::s4u::Comm*>(pred.get());
- if (comm != nullptr) {
- comm->set_destination(selected_host);
- delete static_cast<double*>(comm->get_data());
- }
- }
- // we can also set the source of all the output comms of the selected task
- for (const auto& succ : selected_task->get_successors()) {
- auto* comm = dynamic_cast<simgrid::s4u::Comm*>(succ.get());
- if (comm != nullptr)
- comm->set_source(selected_host);
- }