X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a9d6e27d33824900b142bbf5512eb3673a7ece7e..6af348b861fc72e45173e89c5f9540cefb6ee252:/src/simdag/sd_task.cpp diff --git a/src/simdag/sd_task.cpp b/src/simdag/sd_task.cpp index 84b9b74997..8bbfa7f291 100644 --- a/src/simdag/sd_task.cpp +++ b/src/simdag/sd_task.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2017. The SimGrid Team. +/* Copyright (c) 2006-2018. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -527,13 +527,11 @@ void SD_task_dotty(SD_task_t task, void *out) * \a dst will depend on \a src, ie \a dst will not start before \a src is finished. * Their \ref e_SD_task_state_t "state" must be #SD_NOT_SCHEDULED, #SD_SCHEDULED or #SD_RUNNABLE. * - * \param name the name of the new dependency (can be \c nullptr) - * \param data the user data you want to associate with this dependency (can be \c nullptr) * \param src the task which must be executed first * \param dst the task you want to make depend on \a src * \see SD_task_dependency_remove() */ -void SD_task_dependency_add(const char *name, void *data, SD_task_t src, SD_task_t dst) +void SD_task_dependency_add(SD_task_t src, SD_task_t dst) { if (src == dst) THROWF(arg_error, 0, "Cannot add a dependency between task '%s' and itself", SD_task_get_name(src)); @@ -676,8 +674,8 @@ void SD_task_unwatch(SD_task_t task, e_SD_task_state_t state) * \param bytes_amount communication amount between each pair of hosts (i.e., a matrix of host_count*host_count doubles) * \see SD_schedule() */ -double SD_task_get_execution_time(SD_task_t task, int host_count, const sg_host_t *host_list, - const double *flops_amount, const double *bytes_amount) +double SD_task_get_execution_time(SD_task_t /*task*/, int host_count, const sg_host_t* host_list, + const double* flops_amount, const double* bytes_amount) { xbt_assert(host_count > 0, "Invalid parameter"); double max_time = 0.0; @@ -882,7 +880,8 @@ void SD_task_build_MxN_1D_block_matrix(SD_task_t task, int src_nb, int dst_nb){ XBT_VERB("(%d->%d): (%.2f, %.2f)-> (%.2f, %.2f)", i, j, src_start, src_end, dst_start, dst_end); task->bytes_amount[i*(src_nb+dst_nb)+src_nb+j]=0.0; if ((src_end > dst_start) && (dst_end > src_start)) { /* There is something to send */ - task->bytes_amount[i*(src_nb+dst_nb)+src_nb+j] = MIN(src_end, dst_end)- MAX(src_start, dst_start); + task->bytes_amount[i * (src_nb + dst_nb) + src_nb + j] = + std::min(src_end, dst_end) - std::max(src_start, dst_start); XBT_VERB("==> %.2f", task->bytes_amount[i*(src_nb+dst_nb)+src_nb+j]); } }