X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9f646472eb2d52b33a9be7450259564ac890ea99..c9197fe448d95724ea56119ac409e6460ed86b8a:/src/surf/network_smpi.cpp diff --git a/src/surf/network_smpi.cpp b/src/surf/network_smpi.cpp index 7899183641..cb80aeef00 100644 --- a/src/surf/network_smpi.cpp +++ b/src/surf/network_smpi.cpp @@ -15,8 +15,8 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_network); -xbt_dynar_t smpi_bw_factor = NULL; -xbt_dynar_t smpi_lat_factor = NULL; +xbt_dynar_t smpi_bw_factor = nullptr; +xbt_dynar_t smpi_lat_factor = nullptr; typedef struct s_smpi_factor *smpi_factor_t; typedef struct s_smpi_factor { // FIXME: s_smpi_factor_multival (defined in smpi_base) should be used instead to dedupplicate this code @@ -24,7 +24,7 @@ typedef struct s_smpi_factor { // FIXME: s_smpi_factor_multival (defined in smpi double value; } s_smpi_factor_t; -xbt_dict_t gap_lookup = NULL; +xbt_dict_t gap_lookup = nullptr; static int factor_cmp(const void *pa, const void *pb) { @@ -35,12 +35,12 @@ static int factor_cmp(const void *pa, const void *pb) #include "src/surf/xml/platf.hpp" // FIXME: move that back to the parsing area static xbt_dynar_t parse_factor(const char *smpi_coef_string) { - char *value = NULL; + char *value = nullptr; unsigned int iter = 0; s_smpi_factor_t fact; - xbt_dynar_t smpi_factor, radical_elements, radical_elements2 = NULL; + xbt_dynar_t smpi_factor, radical_elements, radical_elements2 = nullptr; - smpi_factor = xbt_dynar_new(sizeof(s_smpi_factor_t), NULL); + smpi_factor = xbt_dynar_new(sizeof(s_smpi_factor_t), nullptr); radical_elements = xbt_str_split(smpi_coef_string, ";"); xbt_dynar_foreach(radical_elements, iter, value) { @@ -91,8 +91,8 @@ void surf_network_model_init_SMPI(void) surf_network_model = new simgrid::surf::NetworkSmpiModel(); xbt_dynar_push(all_existing_models, &surf_network_model); - xbt_cfg_setdefault_double("network/sender_gap", 10e-6); - xbt_cfg_setdefault_double("network/weight_S", 8775); + xbt_cfg_setdefault_double("network/sender-gap", 10e-6); + xbt_cfg_setdefault_double("network/weight-S", 8775); } namespace simgrid { @@ -117,7 +117,7 @@ namespace simgrid { if (sg_sender_gap > 0.0) { if (!gap_lookup) { - gap_lookup = xbt_dict_new_homogeneous(NULL); + gap_lookup = xbt_dict_new_homogeneous(nullptr); } fifo = (xbt_fifo_t) xbt_dict_get_or_null(gap_lookup, src); action->senderGap_ = 0.0; @@ -138,7 +138,7 @@ namespace simgrid { action->sender.link_name); if (!fifo) { fifo = xbt_fifo_new(); - xbt_dict_set(gap_lookup, action->sender.link_name, fifo, NULL); + xbt_dict_set(gap_lookup, action->sender.link_name, fifo, nullptr); } action->sender.fifo_item = xbt_fifo_push(fifo, action);*/ action->senderSize_ = size; @@ -172,8 +172,7 @@ namespace simgrid { double NetworkSmpiModel::bandwidthFactor(double size) { if (!smpi_bw_factor) - smpi_bw_factor = - parse_factor(sg_cfg_get_string("smpi/bw_factor")); + smpi_bw_factor = parse_factor(xbt_cfg_get_string("smpi/bw-factor")); unsigned int iter = 0; s_smpi_factor_t fact; @@ -193,8 +192,7 @@ namespace simgrid { double NetworkSmpiModel::latencyFactor(double size) { if (!smpi_lat_factor) - smpi_lat_factor = - parse_factor(sg_cfg_get_string("smpi/lat_factor")); + smpi_lat_factor = parse_factor(xbt_cfg_get_string("smpi/lat-factor")); unsigned int iter = 0; s_smpi_factor_t fact;