*/
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);
* 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"
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);
/* 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);
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;