/* 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 <cstddef>
+
+#include <algorithm>
+
+#include <xbt/log.h>
+
#include "network_smpi.hpp"
#include "simgrid/sg_config.h"
if (surf_network_model)
return;
- surf_network_model = new NetworkSmpiModel();
+ surf_network_model = new simgrid::surf::NetworkSmpiModel();
net_define_callbacks();
- xbt_dynar_push(model_list, &surf_network_model);
+ xbt_dynar_push(all_existing_models, &surf_network_model);
xbt_cfg_setdefault_double(_sg_cfg_set, "network/sender_gap", 10e-6);
xbt_cfg_setdefault_double(_sg_cfg_set, "network/weight_S", 8775);
}
+namespace simgrid {
+namespace surf {
+
NetworkSmpiModel::NetworkSmpiModel()
: NetworkCm02Model() {
m_haveGap=true;
}
}
-void NetworkSmpiModel::gapAppend(double size, Link* link, NetworkAction *action)
+void NetworkSmpiModel::gapAppend(double size, Link* link, NetworkAction *act)
{
const char *src = link->getName();
xbt_fifo_t fifo;
+ NetworkCm02Action *action= static_cast<NetworkCm02Action*>(act);
if (sg_sender_gap > 0.0) {
if (!gap_lookup) {
double NetworkSmpiModel::bandwidthConstraint(double rate, double bound, double size)
{
- return rate < 0 ? bound : min(bound, rate * bandwidthFactor(size));
+ return rate < 0 ? bound : std::min(bound, rate * bandwidthFactor(size));
}
/************
/**********
* Action *
**********/
+
+}
+}