Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
hunt down some more short negation forms
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 23 May 2017 22:24:48 +0000 (00:24 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 23 May 2017 22:24:48 +0000 (00:24 +0200)
12 files changed:
src/mc/checker/CommunicationDeterminismChecker.cpp
src/msg/msg_gos.cpp
src/simix/smx_network.cpp
src/smpi/smpi_op.cpp
src/smpi/smpi_request.cpp
src/smpi/smpi_win.cpp
src/surf/instr_routing.cpp
src/surf/network_cm02.cpp
src/surf/network_cm02.hpp
src/surf/network_ib.cpp
src/surf/surf_c_bindings.cpp
src/surf/surf_interface.cpp

index f3d7caa..89e553e 100644 (file)
@@ -370,7 +370,7 @@ static inline bool all_communications_are_finished()
   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;
     }
   }
@@ -503,7 +503,7 @@ void CommunicationDeterminismChecker::main()
     } 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);
index daf0f1d..7bbb303 100644 (file)
@@ -318,7 +318,7 @@ static inline msg_comm_t MSG_task_isend_internal(msg_task_t task, const char *al
   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;
index b10306a..ef153ce 100644 (file)
@@ -189,7 +189,7 @@ smx_activity_t SIMIX_comm_irecv(smx_actor_t dst_proc, smx_mailbox_t mbox, void *
 
   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
index 35b0a73..9cd6612 100644 (file)
@@ -246,7 +246,7 @@ void Op::apply(void *invec, void *inoutvec, int *len, MPI_Datatype datatype)
   }
 
   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);
index ac052b4..733ae20 100644 (file)
@@ -373,9 +373,9 @@ void Request::start()
 
     // 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 )
index 6ac1654..2de3200 100644 (file)
@@ -419,7 +419,7 @@ int Win::compare_and_swap(void *origin_addr, void *compare_addr,
               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);
   }
index d73ddac..72d975c 100644 (file)
@@ -213,7 +213,7 @@ static void instr_routing_parse_start_link(simgrid::s4u::Link& link)
 
   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);
@@ -238,7 +238,7 @@ void sg_instr_new_host(simgrid::s4u::Host& host)
   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);
index 1f204a7..2a867cf 100644 (file)
@@ -318,7 +318,7 @@ Action* NetworkCm02Model::communicate(s4u::Host* src, s4u::Host* dst, double siz
   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);
index 0870271..df834a8 100644 (file)
@@ -13,7 +13,6 @@
 #include "xbt/graph.h"
 
 
-
 /***********
  * Classes *
  ***********/
index 8304958..f0b3320 100644 (file)
@@ -159,7 +159,7 @@ namespace simgrid {
         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 );
index 85582c5..c35e6d1 100644 (file)
@@ -74,7 +74,7 @@ double surf_solve(double max_date)
     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 {
index 58dacc9..845a924 100644 (file)
@@ -577,7 +577,7 @@ bool Resource::isOn() const {
   return isOn_;
 }
 bool Resource::isOff() const {
-  return ! isOn_;
+  return not isOn_;
 }
 
 void Resource::turnOn()