Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
attempt to plug all leaks for simdag.
[simgrid.git] / src / simdag / sd_global.cpp
index b0f93db..a8e4ddd 100644 (file)
@@ -224,13 +224,16 @@ void SD_create_environment(const char *platform_file)
  * \return a dynar of \ref SD_task_t whose state has changed.
  * \see SD_task_schedule(), SD_task_watch()
  */
+void SD_simulate(double how_long)
+{
+  simgrid::sd::simulate(how_long);
+}
 
-xbt_dynar_t SD_simulate(double how_long) {
+void SD_simulate_with_update(double how_long, xbt_dynar_t changed_tasks_dynar)
+{
   std::set<SD_task_t> *changed_tasks = simgrid::sd::simulate(how_long);
-  xbt_dynar_t changed_tasks_dynar = xbt_dynar_new(sizeof(SD_task_t), nullptr);
   for (const auto& task : *changed_tasks)
     xbt_dynar_push(changed_tasks_dynar, &task);
-  return changed_tasks_dynar;
 }
 
 /** @brief Returns the current clock, in seconds */