/** Blocks into the barrier. Every waiting actors will be unlocked once the expected amount of actors reaches the barrier */
int wait();
/** Returns some debug information about the barrier */
- std::string to_string();
+ std::string to_string() const;
#ifndef DOXYGEN
/* refcounting */
{
std::vector<std::string> trace;
for (auto const& state : stack_) {
- auto* t = state->get_transition();
+ const auto* t = state->get_transition();
trace.push_back(xbt::string_printf("%ld: %s", t->aid_, t->to_string().c_str()));
}
return trace;
collective_calls.emplace(comm->id(), std::vector<std::string>{call});
}else{
//are we the first ? add the call
- if (vec->second.size() == (count)){
+ if (vec->second.size() == count) {
vec->second.push_back(call);
- } else if (vec->second.size() > count){
+ } else if (vec->second.size() > count) {
if (vec->second[count] != call){
XBT_WARN("Collective operation mismatch. For process %ld, expected %s, got %s", simgrid::s4u::this_actor::get_pid(), vec->second[count].c_str(), call.c_str());
return MPI_ERR_OTHER;