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
Kill trailing whitespaces in source code files.
[simgrid.git]
/
src
/
surf
/
network_constant.cpp
diff --git
a/src/surf/network_constant.cpp
b/src/surf/network_constant.cpp
index
9394505
..
fa25c66
100644
(file)
--- a/
src/surf/network_constant.cpp
+++ b/
src/surf/network_constant.cpp
@@
-3,12
+3,12
@@
/* 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. */
-#include
"network_constant.hpp"
-#include
"simgrid/kernel/routing/NetZoneImpl.hpp"
-#include "simgrid/s4u/Engine.hpp"
+#include
<simgrid/kernel/routing/NetZoneImpl.hpp>
+#include
<simgrid/s4u/Engine.hpp>
+
#include "src/kernel/EngineImpl.hpp"
#include "src/kernel/EngineImpl.hpp"
+#include "src/surf/network_constant.hpp"
#include "src/surf/surf_interface.hpp"
#include "src/surf/surf_interface.hpp"
-#include "surf/surf.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(res_network);
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(res_network);
@@
-18,16
+18,16
@@
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(res_network);
void surf_network_model_init_Constant()
{
auto net_model = std::make_shared<simgrid::kernel::resource::NetworkConstantModel>("Network_Constant");
void surf_network_model_init_Constant()
{
auto net_model = std::make_shared<simgrid::kernel::resource::NetworkConstantModel>("Network_Constant");
- simgrid::kernel::EngineImpl::get_instance()->add_model(net_model);
- simgrid::s4u::Engine::get_instance()->get_netzone_root()->get_impl()->set_network_model(net_model);
+ auto* engine = simgrid::kernel::EngineImpl::get_instance();
+ engine->add_model(net_model);
+ engine->get_netzone_root()->set_network_model(net_model);
}
namespace simgrid {
namespace kernel {
namespace resource {
}
namespace simgrid {
namespace kernel {
namespace resource {
-LinkImpl* NetworkConstantModel::create_link(const std::string& name, const std::vector<double>& /*bandwidth*/,
- s4u::Link::SharingPolicy /*policy*/)
+LinkImpl* NetworkConstantModel::create_link(const std::string& name, const std::vector<double>& /*bandwidth*/)
{
xbt_die("Refusing to create the link %s: there is no link in the Constant network model. "
"Please remove any link from your platform (and switch to routing='None')",
{
xbt_die("Refusing to create the link %s: there is no link in the Constant network model. "
"Please remove any link from your platform (and switch to routing='None')",
@@
-35,6
+35,11
@@
LinkImpl* NetworkConstantModel::create_link(const std::string& name, const std::
return nullptr;
}
return nullptr;
}
+LinkImpl* NetworkConstantModel::create_wifi_link(const std::string& name, const std::vector<double>& bandwidths)
+{
+ return create_link(name, bandwidths);
+}
+
double NetworkConstantModel::next_occurring_event(double /*now*/)
{
double min = -1.0;
double NetworkConstantModel::next_occurring_event(double /*now*/)
{
double min = -1.0;
@@
-84,7
+89,7
@@
NetworkConstantAction::NetworkConstantAction(NetworkConstantModel* model_, s4u::
{
latency_ = sg_latency_factor;
if (latency_ <= 0.0)
{
latency_ = sg_latency_factor;
if (latency_ <= 0.0)
-
NetworkConstantAction::
set_state(Action::State::FINISHED);
+ set_state(Action::State::FINISHED);
}
void NetworkConstantAction::update_remains_lazy(double /*now*/)
}
void NetworkConstantAction::update_remains_lazy(double /*now*/)