X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9532edf044eed31bcf6de22916c8824e18f373ad..a59a47d79fe092f559a4a03de102402d7085bca9:/src/msg/msg_task.c diff --git a/src/msg/msg_task.c b/src/msg/msg_task.c index 5703d14dab..c6055c5916 100644 --- a/src/msg/msg_task.c +++ b/src/msg/msg_task.c @@ -311,17 +311,18 @@ msg_error_t MSG_task_cancel(msg_task_t task) } /** \ingroup m_task_management - * \brief Returns the computation amount needed to process a task #msg_task_t. + * \brief Returns the remaining amount of flops needed to execute a task #msg_task_t. * * Once a task has been processed, this amount is set to 0. If you want, you * can reset this value with #MSG_task_set_flops_amount before restarting the task. */ -double MSG_task_get_compute_duration(msg_task_t task) -{ - xbt_assert((task != NULL) - && (task->simdata != NULL), "Invalid parameter"); +double MSG_task_get_flops_amount(msg_task_t task) { - return task->simdata->flops_amount; + if (task->simdata->compute) { + return simcall_host_execution_get_remains(task->simdata->compute); + } else { + return task->simdata->flops_amount; + } } @@ -352,26 +353,6 @@ void MSG_task_set_bytes_amount(msg_task_t task, double data_size) } - -/** \ingroup m_task_management - * \brief Returns the remaining computation amount of a task #msg_task_t. - * - * If the task is ongoing, this call retrieves the remaining amount of work. - * If it is not ongoing, it returns the total amount of work that will be - * executed when the task starts. - */ -double MSG_task_get_remaining_computation(msg_task_t task) -{ - xbt_assert((task != NULL) - && (task->simdata != NULL), "Invalid parameter"); - - if (task->simdata->compute) { - return simcall_host_execution_get_remains(task->simdata->compute); - } else { - return task->simdata->flops_amount; - } -} - /** \ingroup m_task_management * \brief Returns the total amount received by a task #msg_task_t. * If the communication does not exist it will return 0.