for (size_t current_actor = 1; current_actor < MC_smx_get_maxpid(); current_actor++) {
xbt_dynar_t pattern = xbt_dynar_get_as(incomplete_communications_pattern, current_actor, xbt_dynar_t);
if (not xbt_dynar_is_empty(pattern)) {
- XBT_DEBUG("Some communications are not finished, cannot stop the exploration ! State not visited.");
+ XBT_DEBUG("Some communications are not finished, cannot stop the exploration! State not visited.");
return false;
}
}
} else {
if (stack_.size() > (std::size_t) _sg_mc_max_depth)
- XBT_WARN("/!\\ Max depth reached ! /!\\ ");
+ XBT_WARN("/!\\ Max depth reached! /!\\ ");
else if (visited_state != nullptr)
XBT_DEBUG("State already visited (equal to state %d), exploration stopped on this path.",
visited_state->original_num == -1 ? visited_state->num : visited_state->original_num);
t_simdata->comm = static_cast<simgrid::kernel::activity::Comm*>(act);
msg_comm_t comm = nullptr;
- if (! detached) {
+ if (not detached) {
comm = xbt_new0(s_msg_comm_t, 1);
comm->task_sent = task;
comm->task_received = nullptr;
simgrid::kernel::activity::Comm* other_comm;
//communication already done, get it inside the list of completed comms
- if (mbox->permanent_receiver != nullptr && ! mbox->done_comm_queue.empty()) {
+ if (mbox->permanent_receiver != nullptr && not mbox->done_comm_queue.empty()) {
XBT_DEBUG("We have a comm that has probably already been received, trying to match it, to skip the communication");
//find a match in the list of already received comms
}
if (not smpi_process()->replaying() && *len > 0) {
- if(! is_fortran_op_)
+ if (not is_fortran_op_)
this->func_(invec, inoutvec, len, &datatype);
else{
XBT_DEBUG("Applying operation of length %d from %p and from/to %p", *len, invec, inoutvec);
// we make a copy here, as the size is modified by simix, and we may reuse the request in another receive later
real_size_=size_;
- action_ = simcall_comm_irecv(process->process(), mailbox, buf_, &real_size_, &match_recv,
- ! process->replaying()? smpi_comm_copy_data_callback
- : &smpi_comm_null_copy_buffer_callback, this, -1.0);
+ action_ = simcall_comm_irecv(
+ process->process(), mailbox, buf_, &real_size_, &match_recv,
+ process->replaying() ? &smpi_comm_null_copy_buffer_callback : smpi_comm_copy_data_callback, this, -1.0);
XBT_DEBUG("recv simcall posted");
if (async_small_thresh != 0 || (flags_ & RMA) != 0 )
target_disp, 1, datatype, &req);
if (req != MPI_REQUEST_NULL)
Request::wait(&req, MPI_STATUS_IGNORE);
- if(! memcmp (result_addr, compare_addr, datatype->get_extent() )){
+ if (not memcmp(result_addr, compare_addr, datatype->get_extent())) {
put(origin_addr, 1, datatype, target_rank,
target_disp, 1, datatype);
}
container_t container = PJ_container_new(link.name(), INSTR_LINK, father);
- if ((TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) && (! TRACE_disable_link())) {
+ if ((TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) && (not TRACE_disable_link())) {
type_t bandwidth = PJ_type_get_or_null("bandwidth", container->type);
if (bandwidth == nullptr) {
bandwidth = PJ_type_variable_new("bandwidth", nullptr, container->type);
container_t father = currentContainer.back();
container_t container = PJ_container_new(host.cname(), INSTR_HOST, father);
- if ((TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) && (! TRACE_disable_speed())) {
+ if ((TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) && (not TRACE_disable_speed())) {
type_t speed = PJ_type_get_or_null ("power", container->type);
if (speed == nullptr){
speed = PJ_type_variable_new ("power", nullptr, container->type);
action->latency_ *= latencyFactor(size);
action->rate_ = bandwidthConstraint(action->rate_, bandwidth_bound, size);
if (haveGap_) {
- xbt_assert(! route->empty(),
+ xbt_assert(not route->empty(),
"Using a model with a gap (e.g., SMPI) with a platform without links (e.g. vivaldi)!!!");
gapAppend(size, route->at(0), action);
#include "xbt/graph.h"
-
/***********
* Classes *
***********/
if((*it)->init_rate==-1)
(*it)->init_rate= rate_before_update;
- penalized_bw= ! num_comm_out ? (*it)->init_rate : (*it)->init_rate /penalty;
+ penalized_bw = num_comm_out ? (*it)->init_rate / penalty : (*it)->init_rate;
if (not double_equals(penalized_bw, rate_before_update, sg_surf_precision)) {
XBT_DEBUG("%d->%d action %p penalty updated : bw now %f, before %f , initial rate %f", root->id,(*it)->destination->id,(*it)->action,penalized_bw, (*it)->action->getBound(), (*it)->init_rate );
next_event_date = future_evt_set->next_date();
XBT_DEBUG("Next TRACE event: %f", next_event_date);
- if(! surf_network_model->nextOccuringEventIsIdempotent()){ // NS3, I see you
+ if (not surf_network_model->nextOccuringEventIsIdempotent()) { // NS3, I see you
if (next_event_date!=-1.0 && time_delta!=-1.0) {
time_delta = MIN(next_event_date - NOW, time_delta);
} else {
return isOn_;
}
bool Resource::isOff() const {
- return ! isOn_;
+ return not isOn_;
}
void Resource::turnOn()