Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove surf_host_model_execute_parallel_task()
authorGabriel Corona <gabriel.corona@loria.fr>
Tue, 12 Jan 2016 14:43:08 +0000 (15:43 +0100)
committerGabriel Corona <gabriel.corona@loria.fr>
Tue, 12 Jan 2016 14:43:08 +0000 (15:43 +0100)
src/include/surf/surf.h
src/simdag/sd_task.cpp
src/simix/smx_host.cpp
src/surf/surf_c_bindings.cpp

index 702678e..d6cd014 100644 (file)
@@ -247,25 +247,6 @@ XBT_PUBLIC(surf_action_t) surf_model_extract_running_action_set(surf_model_t mod
  */
 XBT_PUBLIC(int) surf_model_running_action_set_size(surf_model_t model);
 
-/**
- * @brief Execute a parallel task
- * @details [long description]
- *
- * @param model The model which handle the parallelisation
- * @param host_nb The number of hosts
- * @param host_list The list of hosts on which the task is executed
- * @param flops_amount The processing amount (in flop) needed to process
- * @param bytes_amount The amount of data (in bytes) needed to transfer
- * @param rate [description]
- * @return The action corresponding to the parallele execution task
- */
-XBT_PUBLIC(surf_action_t) surf_host_model_execute_parallel_task(surf_host_model_t model,
-                                                   int host_nb,
-                                        sg_host_t *host_list,
-                                            double *flops_amount,
-                                            double *bytes_amount,
-                                            double rate);
-
 /** @brief Get the route (dynar of sg_link_t) between two hosts */
 XBT_PUBLIC(xbt_dynar_t) surf_host_model_get_route(
   surf_host_model_t model, sg_host_t src, sg_host_t dst);
index 4f06748..2a96efa 100644 (file)
@@ -5,6 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "src/surf/surf_interface.hpp"
+#include "src/surf/host_interface.hpp"
 #include "src/simdag/simdag_private.h"
 #include "simgrid/simdag.h"
 #include "xbt/sysdep.h"
@@ -1133,12 +1134,8 @@ void __SD_task_really_run(SD_task_t task)
     memcpy(bytes_amount, task->bytes_amount,
            sizeof(double) * host_nb * host_nb);
 
-  task->surf_action = surf_host_model_execute_parallel_task((surf_host_model_t)surf_host_model,
-                                                                    host_nb,
-                                                                    hosts,
-                                                                    flops_amount,
-                                                                    bytes_amount,
-                                                                    task->rate);
+  task->surf_action = surf_host_model->executeParallelTask(
+    host_nb, hosts, flops_amount, bytes_amount, task->rate);
 
   task->surf_action->setData(task);
 
index 72a17bf..6cb3ff1 100644 (file)
@@ -353,7 +353,7 @@ smx_synchro_t SIMIX_process_parallel_execute(const char *name,
   /* set surf's synchro */
   if (!MC_is_active() && !MC_record_replay_is_active()) {
     synchro->execution.surf_exec =
-      surf_host_model_execute_parallel_task(surf_host_model,
+      surf_host_model->executeParallelTask(
                  host_nb, host_list_cpy, flops_amount, bytes_amount, rate);
 
     synchro->execution.surf_exec->setData(synchro);
index 19e3a83..47970dd 100644 (file)
@@ -205,16 +205,6 @@ int surf_model_running_action_set_size(surf_model_t model){
   return model->getRunningActionSet()->size();
 }
 
-surf_action_t surf_host_model_execute_parallel_task(surf_host_model_t model,
-                                                   int host_nb,
-                                            sg_host_t *host_list,
-                                            double *flops_amount,
-                                            double *bytes_amount,
-                                            double rate){
-  return static_cast<simgrid::surf::Action*>(
-    model->executeParallelTask(host_nb, host_list, flops_amount, bytes_amount, rate));
-}
-
 xbt_dynar_t surf_host_model_get_route(surf_host_model_t /*model*/,
                                              sg_host_t src, sg_host_t dst){
   xbt_dynar_t route = NULL;