From 3e99be14456cffb23fdd550aa42230e3b0843740 Mon Sep 17 00:00:00 2001 From: Gabriel Corona Date: Tue, 12 Jan 2016 15:43:08 +0100 Subject: [PATCH] Remove surf_host_model_execute_parallel_task() --- src/include/surf/surf.h | 19 ------------------- src/simdag/sd_task.cpp | 9 +++------ src/simix/smx_host.cpp | 2 +- src/surf/surf_c_bindings.cpp | 10 ---------- 4 files changed, 4 insertions(+), 36 deletions(-) diff --git a/src/include/surf/surf.h b/src/include/surf/surf.h index 702678e5b1..d6cd014cff 100644 --- a/src/include/surf/surf.h +++ b/src/include/surf/surf.h @@ -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); diff --git a/src/simdag/sd_task.cpp b/src/simdag/sd_task.cpp index 4f06748cbe..2a96efa84b 100644 --- a/src/simdag/sd_task.cpp +++ b/src/simdag/sd_task.cpp @@ -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); diff --git a/src/simix/smx_host.cpp b/src/simix/smx_host.cpp index 72a17bf07b..6cb3ff1fc8 100644 --- a/src/simix/smx_host.cpp +++ b/src/simix/smx_host.cpp @@ -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); diff --git a/src/surf/surf_c_bindings.cpp b/src/surf/surf_c_bindings.cpp index 19e3a83815..47970ddc4c 100644 --- a/src/surf/surf_c_bindings.cpp +++ b/src/surf/surf_c_bindings.cpp @@ -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( - 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; -- 2.20.1