double max = it.second.get_child("max_x").get_value<double>();
coefs[max] = it.second.get_child("coefficient").get_value<double>();
auto& mixture = mixtures[max];
- if (!mixture)
+ if (not mixture)
mixture = std::make_shared<NormalMixture>(gen);
mixture->append(it.second.get_child("mean").get_value<double>(), it.second.get_child("sd").get_value<double>(),
it.second.get_child("prob").get_value<double>());
seg = read_json_file("recv_ckmeans.json", gen);
smpi_register_op_cost_callback(SmpiOperation::RECV, std::bind(&smpi_cost_cb, seg, std::placeholders::_1,
std::placeholders::_2, std::placeholders::_3));
-}
\ No newline at end of file
+}
#define _xbt_enforce_ARG1(cond) _xbt_enforce_ARGN((cond), "Assertion %s failed", #cond)
#define _xbt_enforce_ARGN(cond, ...) \
do { \
- if (!(cond)) { \
+ if (not(cond)) { \
throw simgrid::AssertionError(XBT_THROW_POINT, xbt::string_printf(__VA_ARGS__)); \
} \
} while (0)
void CpuImpl::apply_sharing_policy_cfg() const
{
- if (!get_constraint())
+ if (not get_constraint())
return;
kernel::lmm::Constraint::SharingPolicy lmm_policy = kernel::lmm::Constraint::SharingPolicy::SHARED;
"contexts/nthreads", "Number of parallel threads used to execute user contexts", 1, [](int nthreads) {
#if HAVE_MMALLOC
xbt_assert(
- nthreads == 1 || !malloc_use_mmalloc(),
+ nthreads == 1 || not malloc_use_mmalloc(),
"Parallel simulation is forbidden in the verified program, as there is no protection against race "
"conditions in mmalloc itself. Please don't be so greedy and show some mercy for our implementation.");
#endif
(stype->duplicated_datatype()!=MPI_DATATYPE_NULL && match_types(stype->duplicated_datatype(), rtype)) ||
(rtype->duplicated_datatype()!=MPI_DATATYPE_NULL && match_types(stype, rtype->duplicated_datatype())))
match = true;
- if (!match)
+ if (not match)
XBT_WARN("Mismatched datatypes : sending %s and receiving %s", stype->name().c_str(), rtype->name().c_str());
return match;
}
receiver->truncated_ = true;
}
//0-sized datatypes/counts should not interfere and match
- if ( sender->real_size_ != 0 && receiver->real_size_ != 0 &&
- !match_types(sender->type_, receiver->type_))
+ if (sender->real_size_ != 0 && receiver->real_size_ != 0 && not match_types(sender->type_, receiver->type_))
receiver->unmatched_types_ = true;
if (sender->detached_)
receiver->detached_sender_ = sender; // tie the sender to the receiver, as it is detached and has to be freed in
XBT_DEBUG("yes there was something for us in the small mailbox");
}
}
- if(!is_probe)
+ if (not is_probe)
flags_ &= ~MPI_REQ_PROBE;
kernel::actor::CommIrecvSimcall observer{process->get_actor()->get_impl(),
mailbox->get_impl(),
} else {
XBT_DEBUG("Yes there was something for us in the large mailbox");
}
- if(!is_probe)
+ if (not is_probe)
flags_ &= ~MPI_REQ_PROBE;
} else {
mailbox = process->mailbox();
colls::barrier(win->comm_);
Comm::unref(win->comm_);
- if (!win->lockers_.empty() || win->opened_ < 0){
+ if (not win->lockers_.empty() || win->opened_ < 0) {
XBT_WARN("Freeing a locked or opened window");
return MPI_ERR_WIN;
}