Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
codefactor: malformed whitespace issues
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Wed, 18 Dec 2019 09:09:28 +0000 (10:09 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Wed, 18 Dec 2019 09:09:28 +0000 (10:09 +0100)
15 files changed:
include/xbt/config.hpp
include/xbt/functional.hpp
src/bindings/java/jmsg_process.cpp
src/bindings/java/jmsg_storage.cpp
src/bindings/java/jmsg_vm.cpp
src/bindings/java/jxbt_utilities.cpp
src/instr/instr_paje_events.cpp
src/kernel/activity/ActivityImpl.hpp
src/kernel/activity/SynchroRaw.cpp
src/plugins/host_dvfs.cpp
src/surf/network_interface.cpp
src/surf/network_interface.hpp
src/surf/network_ns3.cpp
src/xbt/dict_test.cpp
src/xbt/dynar_test.cpp

index a0406db..dbd27f4 100644 (file)
@@ -217,7 +217,6 @@ class Flag {
   std::string name_;
 
 public:
   std::string name_;
 
 public:
-
   /** Constructor
    *
    *  @param name  Flag name
   /** Constructor
    *
    *  @param name  Flag name
@@ -305,7 +304,7 @@ public:
 XBT_PUBLIC void finalize();
 XBT_PUBLIC void show_aliases();
 XBT_PUBLIC void help();
 XBT_PUBLIC void finalize();
 XBT_PUBLIC void show_aliases();
 XBT_PUBLIC void help();
-}
-}
+} // namespace config
+} // namespace simgrid
 
 #endif
 
 #endif
index 386830b..a2ddfa7 100644 (file)
@@ -27,7 +27,6 @@ namespace simgrid {
 namespace xbt {
 
 template <class F> class MainFunction {
 namespace xbt {
 
 template <class F> class MainFunction {
-private:
   F code_;
   std::shared_ptr<const std::vector<std::string>> args_;
 
   F code_;
   std::shared_ptr<const std::vector<std::string>> args_;
 
@@ -109,8 +108,6 @@ template<class T> class Task;
  */
 template<class R, class... Args>
 class Task<R(Args...)> {
  */
 template<class R, class... Args>
 class Task<R(Args...)> {
-private:
-
   // Placeholder for some class type:
   struct whatever {};
 
   // Placeholder for some class type:
   struct whatever {};
 
@@ -189,7 +186,6 @@ public:
   }
 
 private:
   }
 
 private:
-
   template<class F>
   typename std::enable_if<canSBO<F>()>::type
   init(F code)
   template<class F>
   typename std::enable_if<canSBO<F>()>::type
   init(F code)
@@ -260,7 +256,6 @@ public:
 
 template<class F, class... Args>
 class TaskImpl {
 
 template<class F, class... Args>
 class TaskImpl {
-private:
   F code_;
   std::tuple<Args...> args_;
   typedef decltype(simgrid::xbt::apply(std::move(code_), std::move(args_))) result_type;
   F code_;
   std::tuple<Args...> args_;
   typedef decltype(simgrid::xbt::apply(std::move(code_), std::move(args_))) result_type;
index cb71bba..3d94117 100644 (file)
@@ -188,9 +188,9 @@ JNIEXPORT void JNICALL Java_org_simgrid_msg_Process_resume(JNIEnv * env, jobject
   process->resume();
 }
 
   process->resume();
 }
 
-JNIEXPORT void
-JNICALL Java_org_simgrid_msg_Process_setAutoRestart (JNIEnv *env, jobject jprocess, jboolean jauto_restart) {
-
+JNIEXPORT void JNICALL Java_org_simgrid_msg_Process_setAutoRestart(JNIEnv* env, jobject jprocess,
+                                                                   jboolean jauto_restart)
+{
   msg_process_t process = jprocess_to_native(jprocess, env);
   if (not process) {
     jxbt_throw_notbound(env, "process", jprocess);
   msg_process_t process = jprocess_to_native(jprocess, env);
   if (not process) {
     jxbt_throw_notbound(env, "process", jprocess);
index 831aeea..70cd55a 100644 (file)
@@ -170,7 +170,6 @@ Java_org_simgrid_msg_Storage_setProperty(JNIEnv *env, jobject jstorage, jobject
 
   env->ReleaseStringUTFChars((jstring) jvalue, value_java);
   env->ReleaseStringUTFChars((jstring) jname, name);
 
   env->ReleaseStringUTFChars((jstring) jvalue, value_java);
   env->ReleaseStringUTFChars((jstring) jname, name);
-
 }
 
 JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Storage_getHost(JNIEnv * env,jobject jstorage) {
 }
 
 JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Storage_getHost(JNIEnv * env,jobject jstorage) {
index b917e08..07f20e3 100644 (file)
@@ -171,7 +171,6 @@ JNIEXPORT void JNICALL Java_org_simgrid_msg_VM_resume(JNIEnv *env, jobject jvm)
 
 JNIEXPORT jobject JNICALL Java_org_simgrid_msg_VM_getVMByName(JNIEnv* env, jclass cls, jstring jname)
 {
 
 JNIEXPORT jobject JNICALL Java_org_simgrid_msg_VM_getVMByName(JNIEnv* env, jclass cls, jstring jname)
 {
-
   /* get the C string from the java string */
   if (jname == nullptr) {
     jxbt_throw_null(env, "No VM can have a null name");
   /* get the C string from the java string */
   if (jname == nullptr) {
     jxbt_throw_null(env, "No VM can have a null name");
index 896c622..60432ed 100644 (file)
@@ -32,7 +32,6 @@ jmethodID jxbt_get_jmethod(JNIEnv * env, jclass cls, const char *name, const cha
   id = env->GetMethodID(cls, name, signature);
 
   if (not id) {
   id = env->GetMethodID(cls, name, signature);
 
   if (not id) {
-
     jmethodID tostr_id = env->GetMethodID(cls, "getName", "()Ljava/lang/String;");
     jstring jclassname = (jstring) env->CallObjectMethod(cls, tostr_id, nullptr);
     const char *classname = env->GetStringUTFChars(jclassname, 0);
     jmethodID tostr_id = env->GetMethodID(cls, "getName", "()Ljava/lang/String;");
     jstring jclassname = (jstring) env->CallObjectMethod(cls, tostr_id, nullptr);
     const char *classname = env->GetStringUTFChars(jclassname, 0);
index bba1933..e50eda2 100644 (file)
@@ -19,7 +19,7 @@ PajeEvent::PajeEvent(Container* container, Type* type, double timestamp, e_event
     : container_(container), type_(type), timestamp_(timestamp), eventType_(eventType)
 {
   XBT_DEBUG("%s: event_type=%u, timestamp=%.*f", __func__, eventType_, TRACE_precision(), timestamp_);
     : container_(container), type_(type), timestamp_(timestamp), eventType_(eventType)
 {
   XBT_DEBUG("%s: event_type=%u, timestamp=%.*f", __func__, eventType_, TRACE_precision(), timestamp_);
-  if (trace_format == simgrid::instr::TraceFormat::Paje) {
+  if (trace_format == TraceFormat::Paje) {
     stream_ << std::fixed << std::setprecision(TRACE_precision());
     stream_ << eventType_ << " " << timestamp_ << " " << type_->get_id() << " " << container_->get_id();
   }
     stream_ << std::fixed << std::setprecision(TRACE_precision());
     stream_ << eventType_ << " " << timestamp_ << " " << type_->get_id() << " " << container_->get_id();
   }
@@ -28,7 +28,7 @@ PajeEvent::PajeEvent(Container* container, Type* type, double timestamp, e_event
 
 void PajeEvent::print()
 {
 
 void PajeEvent::print()
 {
-  if (trace_format != simgrid::instr::TraceFormat::Paje)
+  if (trace_format != TraceFormat::Paje)
     return;
 
   XBT_DEBUG("Dump %s", stream_.str().c_str());
     return;
 
   XBT_DEBUG("Dump %s", stream_.str().c_str());
@@ -49,7 +49,7 @@ StateEvent::StateEvent(Container* container, Type* type, e_event_type event_type
 
 void NewEvent::print()
 {
 
 void NewEvent::print()
 {
-  if (trace_format != simgrid::instr::TraceFormat::Paje)
+  if (trace_format != TraceFormat::Paje)
     return;
 
   stream_ << " " << value->get_id();
     return;
 
   stream_ << " " << value->get_id();
@@ -60,7 +60,7 @@ void NewEvent::print()
 
 void LinkEvent::print()
 {
 
 void LinkEvent::print()
 {
-  if (trace_format != simgrid::instr::TraceFormat::Paje)
+  if (trace_format != TraceFormat::Paje)
     return;
 
   stream_ << " " << value_ << " " << endpoint_->get_id() << " " << key_;
     return;
 
   stream_ << " " << value_ << " " << endpoint_->get_id() << " " << key_;
@@ -74,7 +74,7 @@ void LinkEvent::print()
 
 void VariableEvent::print()
 {
 
 void VariableEvent::print()
 {
-  if (trace_format != simgrid::instr::TraceFormat::Paje)
+  if (trace_format != TraceFormat::Paje)
     return;
 
   stream_ << " " << value_;
     return;
 
   stream_ << " " << value_;
@@ -85,8 +85,7 @@ void VariableEvent::print()
 
 void StateEvent::print()
 {
 
 void StateEvent::print()
 {
-  if (trace_format == simgrid::instr::TraceFormat::Paje) {
-
+  if (trace_format == TraceFormat::Paje) {
     if (value != nullptr) // PAJE_PopState Event does not need to have a value
       stream_ << " " << value->get_id();
 
     if (value != nullptr) // PAJE_PopState Event does not need to have a value
       stream_ << " " << value->get_id();
 
@@ -100,7 +99,7 @@ void StateEvent::print()
 #endif
     XBT_DEBUG("Dump %s", stream_.str().c_str());
     tracing_file << stream_.str() << std::endl;
 #endif
     XBT_DEBUG("Dump %s", stream_.str().c_str());
     tracing_file << stream_.str() << std::endl;
-  } else if (trace_format == simgrid::instr::TraceFormat::Ti) {
+  } else if (trace_format == TraceFormat::Ti) {
     if (extra_ == nullptr)
       return;
 
     if (extra_ == nullptr)
       return;
 
@@ -112,7 +111,7 @@ void StateEvent::print()
       container_name=std::to_string(stoi(container_name.erase(0, 5)) - 1);
     }
 #if HAVE_SMPI
       container_name=std::to_string(stoi(container_name.erase(0, 5)) - 1);
     }
 #if HAVE_SMPI
-    if (simgrid::config::get_value<bool>("smpi/trace-call-location")) {
+    if (config::get_value<bool>("smpi/trace-call-location")) {
       stream_ << container_name << " location " << filename << " " << linenumber << std::endl ;
     }
 #endif
       stream_ << container_name << " location " << filename << " " << linenumber << std::endl ;
     }
 #endif
@@ -121,7 +120,6 @@ void StateEvent::print()
   } else {
     THROW_IMPOSSIBLE;
   }
   } else {
     THROW_IMPOSSIBLE;
   }
-
-}
-}
 }
 }
+} // namespace instr
+} // namespace simgrid
index df0a712..275ad45 100644 (file)
@@ -36,6 +36,7 @@ enum class State {
 
 class XBT_PUBLIC ActivityImpl {
   std::atomic_int_fast32_t refcount_{0};
 
 class XBT_PUBLIC ActivityImpl {
   std::atomic_int_fast32_t refcount_{0};
+
 public:
   virtual ~ActivityImpl();
   ActivityImpl() = default;
 public:
   virtual ~ActivityImpl();
   ActivityImpl() = default;
index 8a4cb51..625098a 100644 (file)
@@ -78,26 +78,25 @@ void RawImpl::finish()
   }
 
   switch (simcall->call_) {
   }
 
   switch (simcall->call_) {
-
     case SIMCALL_MUTEX_LOCK:
     case SIMCALL_MUTEX_LOCK:
-      simgrid::xbt::intrusive_erase(simcall_mutex_lock__get__mutex(simcall)->sleeping_, *simcall->issuer_);
+      xbt::intrusive_erase(simcall_mutex_lock__get__mutex(simcall)->sleeping_, *simcall->issuer_);
       break;
 
     case SIMCALL_COND_WAIT:
       break;
 
     case SIMCALL_COND_WAIT:
-      simgrid::xbt::intrusive_erase(simcall_cond_wait__get__cond(simcall)->sleeping_, *simcall->issuer_);
+      xbt::intrusive_erase(simcall_cond_wait__get__cond(simcall)->sleeping_, *simcall->issuer_);
       break;
 
     case SIMCALL_COND_WAIT_TIMEOUT:
       break;
 
     case SIMCALL_COND_WAIT_TIMEOUT:
-      simgrid::xbt::intrusive_erase(simcall_cond_wait_timeout__get__cond(simcall)->sleeping_, *simcall->issuer_);
+      xbt::intrusive_erase(simcall_cond_wait_timeout__get__cond(simcall)->sleeping_, *simcall->issuer_);
       simcall_cond_wait_timeout__set__result(simcall, 1); // signal a timeout
       break;
 
     case SIMCALL_SEM_ACQUIRE:
       simcall_cond_wait_timeout__set__result(simcall, 1); // signal a timeout
       break;
 
     case SIMCALL_SEM_ACQUIRE:
-      simgrid::xbt::intrusive_erase(simcall_sem_acquire__get__sem(simcall)->sleeping_, *simcall->issuer_);
+      xbt::intrusive_erase(simcall_sem_acquire__get__sem(simcall)->sleeping_, *simcall->issuer_);
       break;
 
     case SIMCALL_SEM_ACQUIRE_TIMEOUT:
       break;
 
     case SIMCALL_SEM_ACQUIRE_TIMEOUT:
-      simgrid::xbt::intrusive_erase(simcall_sem_acquire_timeout__get__sem(simcall)->sleeping_, *simcall->issuer_);
+      xbt::intrusive_erase(simcall_sem_acquire_timeout__get__sem(simcall)->sleeping_, *simcall->issuer_);
       simcall_sem_acquire_timeout__set__result(simcall, 1); // signal a timeout
       break;
 
       simcall_sem_acquire_timeout__set__result(simcall, 1); // signal a timeout
       break;
 
index f714b0f..af145fb 100644 (file)
@@ -83,8 +83,6 @@ namespace dvfs {
  *  global configuration
  */
 class Governor {
  *  global configuration
  */
 class Governor {
-
-private:
   simgrid::s4u::Host* const host_;
   double sampling_rate_;
   int min_pstate; //< Never use a pstate less than this one
   simgrid::s4u::Host* const host_;
   double sampling_rate_;
   int min_pstate; //< Never use a pstate less than this one
index 5a23538..a2c886a 100644 (file)
@@ -76,7 +76,6 @@ double NetworkModel::next_occurring_event_full(double now)
 LinkImpl::LinkImpl(NetworkModel* model, const std::string& name, lmm::Constraint* constraint)
     : Resource(model, name, constraint), piface_(this)
 {
 LinkImpl::LinkImpl(NetworkModel* model, const std::string& name, lmm::Constraint* constraint)
     : Resource(model, name, constraint), piface_(this)
 {
-
   if (name != "__loopback__")
     xbt_assert(not s4u::Link::by_name_or_null(name), "Link '%s' declared several times in the platform.", name.c_str());
 
   if (name != "__loopback__")
     xbt_assert(not s4u::Link::by_name_or_null(name), "Link '%s' declared several times in the platform.", name.c_str());
 
index 69fbcb2..0d92c8d 100644 (file)
@@ -157,7 +157,6 @@ public:
 
   Metric latency_                   = {0.0, 0, nullptr};
   Metric bandwidth_                 = {1.0, 0, nullptr};
 
   Metric latency_                   = {0.0, 0, nullptr};
   Metric bandwidth_                 = {1.0, 0, nullptr};
-
 };
 
 /**********
 };
 
 /**********
index 74d8e40..032b69f 100644 (file)
@@ -310,7 +310,6 @@ void LinkNS3::set_latency_profile(profile::Profile*)
 NetworkNS3Action::NetworkNS3Action(Model* model, double totalBytes, s4u::Host* src, s4u::Host* dst)
     : NetworkAction(model, totalBytes, false), src_(src), dst_(dst)
 {
 NetworkNS3Action::NetworkNS3Action(Model* model, double totalBytes, s4u::Host* src, s4u::Host* dst)
     : NetworkAction(model, totalBytes, false), src_(src), dst_(dst)
 {
-  
   // If there is no other started actions, we need to move NS-3 forward to be sync with SimGrid
   if (model->get_started_action_set()->size()==1){
     while(double_positive(surf_get_clock() - ns3::Simulator::Now().GetSeconds(), sg_surf_precision)){
   // If there is no other started actions, we need to move NS-3 forward to be sync with SimGrid
   if (model->get_started_action_set()->size()==1){
     while(double_positive(surf_get_clock() - ns3::Simulator::Now().GetSeconds(), sg_surf_precision)){
index c7588cd..8fe2f65 100644 (file)
@@ -142,7 +142,6 @@ static int countelems(xbt_dict_t head)
 
 TEST_CASE("xbt::dict: dict data container", "dict")
 {
 
 TEST_CASE("xbt::dict: dict data container", "dict")
 {
-
   SECTION("Basic usage: change, retrieve and traverse homogeneous dicts")
   {
     INFO("Traversal the null dictionary");
   SECTION("Basic usage: change, retrieve and traverse homogeneous dicts")
   {
     INFO("Traversal the null dictionary");
index 5f642de..d549738 100644 (file)
@@ -14,7 +14,6 @@ constexpr int NB_ELEM = 5000;
 
 TEST_CASE("xbt::dynar: generic C vector", "dynar")
 {
 
 TEST_CASE("xbt::dynar: generic C vector", "dynar")
 {
-
   SECTION("Dynars of integers")
   {
     /* Vars_decl [doxygen cruft] */
   SECTION("Dynars of integers")
   {
     /* Vars_decl [doxygen cruft] */