A
lgorithmique
N
umérique
D
istribuée
Private GIT Repository
projects
/
loba.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use absolute path for SIMGRID_INSTALL_DIR.
[loba.git]
/
messages.cpp
diff --git
a/messages.cpp
b/messages.cpp
index 0abf913987782ce2399d3f9285c20235c45135d6..f5df3969b38db3d09707f097e93370aaa19dbcb3 100644
(file)
--- a/
messages.cpp
+++ b/
messages.cpp
@@
-4,6
+4,7
@@
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(comm);
#include "misc.h"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(comm);
#include "misc.h"
+#include "options.h"
#include "messages.h"
#include "messages.h"
@@
-16,6
+17,15
@@
std::string message::to_string()
return oss.str();
}
return oss.str();
}
+double message::get_size() const
+{
+ // arbitrary: 8 for type, and 8 for amount
+ double size = 16;
+ if (type == LOAD)
+ size += opt::comm_cost(amount);
+ return size;
+}
+
void message_queue::push(m_task_t task)
{
mutex.acquire();
void message_queue::push(m_task_t task)
{
mutex.acquire();