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
[sonar] Explicit cast when loosing precision (C++ examples).
[simgrid.git]
/
examples
/
smpi
/
smpi_s4u_masterslave
/
masterslave_mailbox_smpi.cpp
diff --git
a/examples/smpi/smpi_s4u_masterslave/masterslave_mailbox_smpi.cpp
b/examples/smpi/smpi_s4u_masterslave/masterslave_mailbox_smpi.cpp
index a786889f331d63be9cddd01f68dbf74c881eb020..6ed9f330e97fd623ee5a1f1c14f25e7554f3bed2 100644
(file)
--- a/
examples/smpi/smpi_s4u_masterslave/masterslave_mailbox_smpi.cpp
+++ b/
examples/smpi/smpi_s4u_masterslave/masterslave_mailbox_smpi.cpp
@@
-14,9
+14,9
@@
static void master(std::vector<std::string> args)
{
xbt_assert(args.size() > 4, "The master function expects at least 3 arguments");
- long tasks_count
= std::stol(args[1]);
- double compute_cost
= std::stod(args[2]);
-
double communication_cost = std::stod
(args[3]);
+ long tasks_count = std::stol(args[1]);
+ double compute_cost = std::stod(args[2]);
+
long communication_cost = std::stol
(args[3]);
std::vector<simgrid::s4u::Mailbox*> workers;
for (unsigned int i = 4; i < args.size(); i++)
workers.push_back(simgrid::s4u::Mailbox::by_name(args[i]));