X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/43540e99b9c710a14e7626d346b3f45b8ed4e7e5..16bbb8a8212497d9c44c81333ed2c0e689e0c5af:/src/surf/network_smpi.cpp?ds=sidebyside diff --git a/src/surf/network_smpi.cpp b/src/surf/network_smpi.cpp index 045ccc5c96..ff92bf92a7 100644 --- a/src/surf/network_smpi.cpp +++ b/src/surf/network_smpi.cpp @@ -4,6 +4,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. */ +#include + +#include + +#include + #include "network_smpi.hpp" #include "simgrid/sg_config.h" @@ -77,7 +83,7 @@ void surf_network_model_init_SMPI(void) if (surf_network_model) return; - surf_network_model = new NetworkSmpiModel(); + surf_network_model = new simgrid::surf::NetworkSmpiModel(); net_define_callbacks(); xbt_dynar_push(all_existing_models, &surf_network_model); @@ -85,9 +91,12 @@ void surf_network_model_init_SMPI(void) xbt_cfg_setdefault_double(_sg_cfg_set, "network/weight_S", 8775); } +namespace simgrid { +namespace surf { + NetworkSmpiModel::NetworkSmpiModel() : NetworkCm02Model() { - m_haveGap=true; + m_haveGap=true; } NetworkSmpiModel::~NetworkSmpiModel(){ @@ -208,7 +217,7 @@ double NetworkSmpiModel::latencyFactor(double size) 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)); } /************ @@ -220,3 +229,6 @@ double NetworkSmpiModel::bandwidthConstraint(double rate, double bound, double s /********** * Action * **********/ + +} +}