A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reimplement s4u::Barrier natively, and make them visible from MC
[simgrid.git]
/
src
/
msg
/
msg_task.cpp
diff --git
a/src/msg/msg_task.cpp
b/src/msg/msg_task.cpp
index
c22cdc8
..
fc934d2
100644
(file)
--- a/
src/msg/msg_task.cpp
+++ b/
src/msg/msg_task.cpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2004-202
1
. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2004-202
2
. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
@@
-28,7
+28,7
@@
Task::Task(const std::string& name, double flops_amount, double bytes_amount, vo
id_ = counter++;
set_data(data);
if (MC_is_active())
id_ = counter++;
set_data(data);
if (MC_is_active())
- MC_ignore_heap(&
(id_), sizeof(id_)
);
+ MC_ignore_heap(&
id_, sizeof id_
);
}
Task::Task(const std::string& name, std::vector<s4u::Host*>&& hosts, std::vector<double>&& flops_amount,
}
Task::Task(const std::string& name, std::vector<s4u::Host*>&& hosts, std::vector<double>&& flops_amount,
@@
-221,7
+221,7
@@
msg_task_t MSG_task_create(const char *name, double flop_amount, double message_
* A constructor for #msg_task_t taking six arguments.
*
* @beginrst
* A constructor for #msg_task_t taking six arguments.
*
* @beginrst
- * See :
cpp:func:`void simgrid::s4u::this_actor::parallel_execute(int, s4u::Host**, double*, double*)
` for
+ * See :
ref:`simgrid::s4u::this_actor::parallel_execute() <API_s4u_parallel_execute>
` for
* the exact semantic of the parameters.
* @endrst
*
* the exact semantic of the parameters.
* @endrst
*
@@
-246,7
+246,7
@@
msg_task_t MSG_parallel_task_create(const char *name, int host_nb, const msg_hos
/** @brief Return the user data of the given task */
void* MSG_task_get_data(const_msg_task_t task)
{
/** @brief Return the user data of the given task */
void* MSG_task_get_data(const_msg_task_t task)
{
- return task->get_data();
+ return task->get_data
<void>
();
}
/** @brief Sets the user data of a given task */
}
/** @brief Sets the user data of a given task */
@@
-700,7
+700,7
@@
double MSG_task_get_remaining_work_ratio(const_msg_task_t task)
*/
double MSG_task_get_flops_amount(const_msg_task_t task)
{
*/
double MSG_task_get_flops_amount(const_msg_task_t task)
{
- if (task->compute != nullptr) {
+ if (task->compute != nullptr
&& task->compute->get_state() == simgrid::s4u::Activity::State::STARTED
) {
return task->compute->get_remaining();
} else {
// Not started or already done.
return task->compute->get_remaining();
} else {
// Not started or already done.
@@
-737,7
+737,7
@@
void MSG_task_set_bytes_amount(msg_task_t task, double data_size)
*/
double MSG_task_get_remaining_communication(const_msg_task_t task)
{
*/
double MSG_task_get_remaining_communication(const_msg_task_t task)
{
- XBT_DEBUG("calling s
imcall_communication_get_remains
(%p)", task->comm.get());
+ XBT_DEBUG("calling s
4u::Comm::get_remaining
(%p)", task->comm.get());
return task->comm->get_remaining();
}
return task->comm->get_remaining();
}
@@
-778,13
+778,11
@@
void MSG_task_set_bound(msg_task_t task, double bound)
* (or with #TRACE_category_with_color).
*
* @beginrst
* (or with #TRACE_category_with_color).
*
* @beginrst
- * See :ref:`outcome
s
_vizu` for details on how to trace the (categorized) resource utilization.
+ * See :ref:`outcome_vizu` for details on how to trace the (categorized) resource utilization.
* @endrst
*
* @param task the task that is going to be categorized
* @param category the name of the category to be associated to the task
* @endrst
*
* @param task the task that is going to be categorized
* @param category the name of the category to be associated to the task
- *
- * @see MSG_task_get_category, TRACE_category, TRACE_category_with_color
*/
void MSG_task_set_category(msg_task_t task, const char* category)
{
*/
void MSG_task_set_category(msg_task_t task, const char* category)
{