-/* Copyright (c) 2016-2021. The SimGrid Team.
+/* Copyright (c) 2016-2022. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include "smpi_utils.hpp"
-#include "src/surf/xml/platf_private.hpp"
+#include "private.hpp"
+#include "smpi_config.hpp"
+#include "src/surf/xml/platf.hpp"
+#include "xbt/file.hpp"
#include "xbt/log.h"
#include "xbt/parse_units.hpp"
#include "xbt/sysdep.h"
-#include "xbt/file.hpp"
-#include <boost/tokenizer.hpp>
-#include "smpi_config.hpp"
-#include "src/simix/smx_private.hpp"
#include <algorithm>
-#include "private.hpp"
+#include <boost/tokenizer.hpp>
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_utils, smpi, "Logging specific to SMPI (utils)");
* E --> F
* G --> H
*/
- for (Tokenizer::iterator token_iter = tokens.begin(); token_iter != tokens.end(); ++token_iter) {
+ for (auto token_iter = tokens.begin(); token_iter != tokens.end(); ++token_iter) {
XBT_DEBUG("token: %s", token_iter->c_str());
Tokenizer factor_values(*token_iter, factor_separator);
s_smpi_factor_t fact;
xbt_assert(factor_values.begin() != factor_values.end(), "Malformed radical for smpi factor: '%s'",
smpi_coef_string.c_str());
unsigned int iteration = 0;
- for (Tokenizer::iterator factor_iter = factor_values.begin(); factor_iter != factor_values.end(); ++factor_iter) {
+ for (auto factor_iter = factor_values.begin(); factor_iter != factor_values.end(); ++factor_iter) {
iteration++;
if (factor_iter == factor_values.begin()) { /* first element */
}
}
-void print_buffer_info(){
- if(not current_buffer1.name.empty())
- XBT_INFO("Buffer %s was allocated from %s line %d, with size %zu", current_buffer1.name.c_str(), current_buffer1.alloc.file.c_str(), current_buffer1.alloc.line, current_buffer1.alloc.size);
- if(not current_buffer2.name.empty())
- XBT_INFO("Buffer %s was allocated from %s line %d, with size %zu", current_buffer2.name.c_str(), current_buffer2.alloc.file.c_str(), current_buffer2.alloc.line, current_buffer2.alloc.size);
+void print_buffer_info()
+{
+ if (not current_buffer1.name.empty())
+ XBT_INFO("Buffer %s was allocated from %s line %d, with size %zu", current_buffer1.name.c_str(),
+ current_buffer1.alloc.file.c_str(), current_buffer1.alloc.line, current_buffer1.alloc.size);
+ if (not current_buffer2.name.empty())
+ XBT_INFO("Buffer %s was allocated from %s line %d, with size %zu", current_buffer2.name.c_str(),
+ current_buffer2.alloc.file.c_str(), current_buffer2.alloc.line, current_buffer2.alloc.size);
}
size_t get_buffer_size(const void* buf){