Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
All this started with a simple namespace renaming
authorMartin Quinson <martin.quinson@loria.fr>
Thu, 30 Nov 2017 20:26:50 +0000 (21:26 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Thu, 30 Nov 2017 20:31:58 +0000 (21:31 +0100)
to move the lmm related stuff into their own namespace. But one cannot
split a huge namespace such as simgrid::surf without retaliation.

21 files changed:
include/simgrid/forward.h
src/include/surf/datatypes.hpp [deleted file]
src/include/surf/surf.hpp
src/kernel/lmm/fair_bottleneck.cpp
src/kernel/lmm/lagrange.cpp
src/kernel/lmm/maxmin.cpp
src/kernel/lmm/maxmin.hpp [moved from src/include/surf/maxmin.hpp with 96% similarity]
src/plugins/vm/VirtualMachineImpl.cpp
src/s4u/s4u_link.cpp
src/simgrid/sg_config.cpp
src/surf/StorageImpl.cpp
src/surf/cpu_cas01.cpp
src/surf/cpu_interface.hpp
src/surf/network_cm02.cpp
src/surf/network_ib.cpp
src/surf/network_interface.hpp
src/surf/ptask_L07.cpp
src/surf/storage_n11.cpp
teshsuite/surf/lmm_usage/lmm_usage.cpp
teshsuite/surf/maxmin_bench/maxmin_bench.cpp
tools/cmake/DefinePackages.cmake

index 9a996b9..3b96273 100644 (file)
@@ -37,7 +37,13 @@ namespace activity {
 
   class MailboxImpl;
 }
-
+namespace lmm {
+class s_lmm_element_t;
+class s_lmm_variable_t;
+class s_lmm_constraint_t;
+class s_lmm_constraint_light_t;
+class s_lmm_system_t;
+}
 namespace routing {
   class NetPoint;
 }
@@ -81,6 +87,12 @@ typedef simgrid::simix::MutexImpl* smx_mutex_t;
 typedef simgrid::kernel::activity::MailboxImpl* smx_mailbox_t;
 typedef simgrid::surf::StorageImpl* surf_storage_t;
 
+typedef simgrid::kernel::lmm::s_lmm_element_t* lmm_element_t;
+typedef simgrid::kernel::lmm::s_lmm_variable_t* lmm_variable_t;
+typedef simgrid::kernel::lmm::s_lmm_constraint_t* lmm_constraint_t;
+typedef simgrid::kernel::lmm::s_lmm_constraint_light_t* lmm_constraint_light_t;
+typedef simgrid::kernel::lmm::s_lmm_system_t* lmm_system_t;
+
 #else
 
 typedef struct s4u_Actor s4u_Actor;
diff --git a/src/include/surf/datatypes.hpp b/src/include/surf/datatypes.hpp
deleted file mode 100644 (file)
index 235dbf1..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright (c) 2009-2017. The SimGrid Team. All rights reserved.          */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-#ifndef MAXMIN_DATATYPES_HPP
-#define MAXMIN_DATATYPES_HPP
-
-namespace simgrid {
-namespace surf {
-typedef struct s_lmm_element_t* lmm_element_t;
-typedef struct s_lmm_variable_t* lmm_variable_t;
-typedef struct s_lmm_constraint_t* lmm_constraint_t;
-typedef struct s_lmm_constraint_light_t* lmm_constraint_light_t;
-typedef struct s_lmm_system_t* lmm_system_t;
-}
-}
-
-#endif
index a6654ac..373e22e 100644 (file)
@@ -9,7 +9,6 @@
 #include "simgrid/datatypes.h"
 #include "simgrid/forward.h"
 #include "src/internal_config.h"
-#include "surf/datatypes.hpp"
 #include "xbt/config.h"
 #include "xbt/dict.h"
 #include "xbt/dynar.h"
index ed92dfa..0b5a9b4 100644 (file)
@@ -4,7 +4,7 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "surf/maxmin.hpp"
+#include "src/kernel/lmm/maxmin.hpp"
 #include "xbt/log.h"
 #include "xbt/sysdep.h"
 #include <algorithm>
@@ -17,7 +17,7 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_maxmin);
 #define SHOW_EXPR_D(expr) XBT_DEBUG(#expr " = %d", expr);
 #define SHOW_EXPR_P(expr) XBT_DEBUG(#expr " = %p", expr);
 
-void simgrid::surf::bottleneck_solve(lmm_system_t sys)
+void simgrid::kernel::lmm::bottleneck_solve(lmm_system_t sys)
 {
   void* _var;
   void* _var_next;
index 8c61de7..bb355c5 100644 (file)
@@ -7,7 +7,7 @@
  * Modeling the proportional fairness using the Lagrangian Optimization Approach. For a detailed description see:
  * "ssh://username@scm.gforge.inria.fr/svn/memo/people/pvelho/lagrange/ppf.ps".
  */
-#include "surf/maxmin.hpp"
+#include "src/kernel/lmm/maxmin.hpp"
 #include "xbt/log.h"
 #include "xbt/sysdep.h"
 
@@ -26,7 +26,8 @@ XBT_LOG_NEW_SUBCATEGORY(surf_lagrange_dichotomy, surf_lagrange, "Logging specifi
 #define RENO2_SCALING 1.0
 
 namespace simgrid {
-namespace surf {
+namespace kernel {
+namespace lmm {
 
 double (*func_f_def)(lmm_variable_t, double);
 double (*func_fp_def)(lmm_variable_t, double);
@@ -561,3 +562,4 @@ double func_reno2_fpi(lmm_variable_t var, double x)
 }
 }
 }
+}
index eb7b484..153707a 100644 (file)
@@ -5,7 +5,7 @@
 
 /* \file callbacks.h */
 
-#include "surf/maxmin.hpp"
+#include "src/kernel/lmm/maxmin.hpp"
 #include "xbt/backtrace.hpp"
 #include "xbt/log.h"
 #include "xbt/mallocator.h"
@@ -24,7 +24,8 @@ double sg_surf_precision   = 0.00001; /* Change this with --cfg=surf/precision:V
 int sg_concurrency_limit   = -1;      /* Change this with --cfg=maxmin/concurrency-limit:VALUE */
 
 namespace simgrid {
-namespace surf {
+namespace kernel {
+namespace lmm {
 
 typedef std::vector<int> dyn_light_t;
 
@@ -1035,3 +1036,4 @@ int s_lmm_constraint_t::get_variable_amount() const
 }
 }
 }
+}
similarity index 96%
rename from src/include/surf/maxmin.hpp
rename to src/kernel/lmm/maxmin.hpp
index 1012ce1..61f78ed 100644 (file)
@@ -18,7 +18,8 @@
 #include <vector>
 
 namespace simgrid {
-namespace surf {
+namespace kernel {
+namespace lmm {
 
 /** @addtogroup SURF_lmm
  * @details
@@ -166,7 +167,8 @@ XBT_PUBLIC(double) func_vegas_fpi(lmm_variable_t var, double x);
  * Then, it is used to list all variables involved in constraint through constraint's xxx_element_set lists, or
  * vice-versa list all constraints for a given variable.
  */
-XBT_PUBLIC_CLASS s_lmm_element_t {
+XBT_PUBLIC_CLASS s_lmm_element_t
+{
 public:
   int get_concurrency() const;
   void decrease_concurrency();
@@ -203,7 +205,8 @@ struct s_lmm_constraint_light_t {
  * \li Active elements which variable's weight is non-zero (i.e. it is enabled) AND its element value is non-zero.
  *     LMM_solve iterates over active elements during resolution, dynamically making them active or unactive.
  */
-XBT_PUBLIC_CLASS s_lmm_constraint_t {
+XBT_PUBLIC_CLASS s_lmm_constraint_t
+{
 public:
   s_lmm_constraint_t() = default;
   s_lmm_constraint_t(void* id_value, double bound_value);
@@ -270,7 +273,7 @@ public:
    * @param elem A element of constraint of the constraint or NULL
    * @return A variable associated to a constraint
    */
-  lmm_variable_t get_variable(lmm_element_t* elem) const;
+  lmm_variable_t get_variable(lmm_element_t * elem) const;
 
   /**
    * @brief Get a var associated to a constraint
@@ -280,7 +283,7 @@ public:
    * @param numelem parameter representing the number of elements to go
    * @return A variable associated to a constraint
    */
-  lmm_variable_t get_variable_safe(lmm_element_t* elem, lmm_element_t* nextelem, int* numelem) const;
+  lmm_variable_t get_variable_safe(lmm_element_t * elem, lmm_element_t * nextelem, int* numelem) const;
 
   /**
    * @brief Get the data associated to a constraint
@@ -323,9 +326,10 @@ private:
  * When something prevents us from enabling a variable, we "stage" the weight that we would have like to set, so that as
  * soon as possible we enable the variable with desired weight
  */
-XBT_PUBLIC_CLASS s_lmm_variable_t {
+XBT_PUBLIC_CLASS s_lmm_variable_t
+{
 public:
-  void initialize(simgrid::surf::Action* id_value, double sharing_weight_value, double bound_value,
+  void initialize(simgrid::surf::Action * id_value, double sharing_weight_value, double bound_value,
                   int number_of_constraints, unsigned visited_value);
 
   /**
@@ -409,9 +413,9 @@ public:
   /* \begin{For Lagrange only} */
   double mu;
   double new_mu;
-  double (*func_f)(s_lmm_variable_t* var, double x);   /* (f)    */
-  double (*func_fp)(s_lmm_variable_t* var, double x);  /* (f')    */
-  double (*func_fpi)(s_lmm_variable_t* var, double x); /* (f')^{-1}    */
+  double (*func_f)(s_lmm_variable_t * var, double x);   /* (f)    */
+  double (*func_fp)(s_lmm_variable_t * var, double x);  /* (f')    */
+  double (*func_fpi)(s_lmm_variable_t * var, double x); /* (f')^{-1}    */
   /* \end{For Lagrange only} */
 
 private:
@@ -430,7 +434,8 @@ inline void s_lmm_element_t::make_inactive()
 /**
  * @brief LMM system
  */
-XBT_PUBLIC_CLASS s_lmm_system_t {
+XBT_PUBLIC_CLASS s_lmm_system_t
+{
 public:
   /**
    * @brief Create a new Linear MaxMim system
@@ -454,7 +459,7 @@ public:
    * @param bound The maximum value of the variable (-1.0 if no maximum value)
    * @param number_of_constraints The maximum number of constraint to associate to the variable
    */
-  lmm_variable_t variable_new(simgrid::surf::Action* id, double weight_value, double bound, int number_of_constraints);
+  lmm_variable_t variable_new(simgrid::surf::Action * id, double weight_value, double bound, int number_of_constraints);
 
   /**
    * @brief Free a variable
@@ -579,5 +584,6 @@ extern XBT_PRIVATE double (*func_fpi_def)(lmm_variable_t, double);
 /** @} */
 }
 }
+}
 
 #endif
index 1a1f03a..2cccd60 100644 (file)
@@ -98,7 +98,7 @@ double VMModel::nextOccuringEvent(double now)
     XBT_DEBUG("assign %f to vm %s @ pm %s", solved_value, ws_vm->getCname(), ws_vm->pimpl_vm_->getPm()->getCname());
 
     xbt_assert(cpu->model() == surf_cpu_model_vm);
-    surf::lmm_system_t vcpu_system = cpu->model()->getMaxminSystem();
+    lmm_system_t vcpu_system = cpu->model()->getMaxminSystem();
     vcpu_system->update_constraint_bound(cpu->constraint(), virt_overhead * solved_value);
   }
 
index dcac704..b0de6a6 100644 (file)
@@ -8,8 +8,8 @@
 #include "simgrid/s4u/Link.hpp"
 #include "simgrid/sg_config.h"
 #include "simgrid/simix.hpp"
+#include "src/kernel/lmm/maxmin.hpp"
 #include "src/surf/network_interface.hpp"
-#include "surf/maxmin.hpp"
 #include "xbt/log.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_link, s4u, "Logging specific to the S4U links");
index 281feaa..19e7b14 100644 (file)
@@ -11,9 +11,9 @@
 #include "simgrid/instr.h"
 #include "simgrid/simix.h"
 #include "simgrid_config.h" /* what was compiled in? */
+#include "src/kernel/lmm/maxmin.hpp"
 #include "src/mc/mc_replay.hpp"
 #include "src/surf/surf_interface.hpp"
-#include "surf/maxmin.hpp"
 #include "surf/surf.hpp"
 #include "xbt/config.h"
 #include "xbt/config.hpp"
index 6b79856..7741eb1 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "StorageImpl.hpp"
-#include "surf/maxmin.hpp"
+#include "src/kernel/lmm/maxmin.hpp"
 #include "surf_private.hpp"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_storage, surf, "Logging specific to the SURF storage module");
@@ -41,7 +41,7 @@ StorageImpl* StorageImpl::byName(std::string name)
 
 StorageModel::StorageModel() : Model()
 {
-  maxminSystem_ = new s_lmm_system_t(true /* lazy update */);
+  maxminSystem_ = new simgrid::kernel::lmm::s_lmm_system_t(true /* lazy update */);
 }
 
 StorageModel::~StorageModel()
index d25bf1f..36fbc73 100644 (file)
@@ -7,7 +7,7 @@
 #include "cpu_cas01.hpp"
 #include "cpu_ti.hpp"
 #include "simgrid/sg_config.h"
-#include "surf/maxmin.hpp"
+#include "src/kernel/lmm/maxmin.hpp"
 #include <algorithm>
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_cpu_cas, surf_cpu, "Logging specific to the SURF CPU IMPROVED module");
@@ -53,7 +53,7 @@ CpuCas01Model::CpuCas01Model() : simgrid::surf::CpuModel()
   }
 
   p_cpuRunningActionSetThatDoesNotNeedBeingChecked = new ActionList();
-  maxminSystem_                                    = new s_lmm_system_t(selectiveUpdate_);
+  maxminSystem_                                    = new simgrid::kernel::lmm::s_lmm_system_t(selectiveUpdate_);
 
   if (getUpdateMechanism() == UM_LAZY) {
     modifiedSet_ = new ActionLmmList();
index ab01fc3..a726ecb 100644 (file)
@@ -7,7 +7,7 @@
 #define SURF_CPU_INTERFACE_HPP_
 
 #include "simgrid/s4u/Host.hpp"
-#include "surf/maxmin.hpp"
+#include "src/kernel/lmm/maxmin.hpp"
 
 #include <list>
 
index 915e5c2..66a838f 100644 (file)
@@ -9,7 +9,7 @@
 #include "simgrid/s4u/Host.hpp"
 #include "simgrid/sg_config.h"
 #include "src/instr/instr_private.hpp" // TRACE_is_enabled(). FIXME: remove by subscribing tracing to the surf signals
-#include "surf/maxmin.hpp"
+#include "src/kernel/lmm/maxmin.hpp"
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_network);
 
@@ -87,14 +87,14 @@ void surf_network_model_init_Reno()
   if (surf_network_model)
     return;
 
-  lmm_set_default_protocol_function(simgrid::surf::func_reno_f, simgrid::surf::func_reno_fp,
-                                    simgrid::surf::func_reno_fpi);
+  lmm_set_default_protocol_function(simgrid::kernel::lmm::func_reno_f, simgrid::kernel::lmm::func_reno_fp,
+                                    simgrid::kernel::lmm::func_reno_fpi);
 
   xbt_cfg_setdefault_double("network/latency-factor", 13.01);
   xbt_cfg_setdefault_double("network/bandwidth-factor", 0.97);
   xbt_cfg_setdefault_double("network/weight-S", 20537);
 
-  surf_network_model = new simgrid::surf::NetworkCm02Model(&simgrid::surf::lagrange_solve);
+  surf_network_model = new simgrid::surf::NetworkCm02Model(&simgrid::kernel::lmm::lagrange_solve);
   all_existing_models->push_back(surf_network_model);
 }
 
@@ -104,14 +104,14 @@ void surf_network_model_init_Reno2()
   if (surf_network_model)
     return;
 
-  lmm_set_default_protocol_function(simgrid::surf::func_reno2_f, simgrid::surf::func_reno2_fp,
-                                    simgrid::surf::func_reno2_fpi);
+  lmm_set_default_protocol_function(simgrid::kernel::lmm::func_reno2_f, simgrid::kernel::lmm::func_reno2_fp,
+                                    simgrid::kernel::lmm::func_reno2_fpi);
 
   xbt_cfg_setdefault_double("network/latency-factor", 13.01);
   xbt_cfg_setdefault_double("network/bandwidth-factor", 0.97);
   xbt_cfg_setdefault_double("network/weight-S", 20537);
 
-  surf_network_model = new simgrid::surf::NetworkCm02Model(&simgrid::surf::lagrange_solve);
+  surf_network_model = new simgrid::surf::NetworkCm02Model(&simgrid::kernel::lmm::lagrange_solve);
   all_existing_models->push_back(surf_network_model);
 }
 
@@ -120,14 +120,14 @@ void surf_network_model_init_Vegas()
   if (surf_network_model)
     return;
 
-  lmm_set_default_protocol_function(simgrid::surf::func_vegas_f, simgrid::surf::func_vegas_fp,
-                                    simgrid::surf::func_vegas_fpi);
+  lmm_set_default_protocol_function(simgrid::kernel::lmm::func_vegas_f, simgrid::kernel::lmm::func_vegas_fp,
+                                    simgrid::kernel::lmm::func_vegas_fpi);
 
   xbt_cfg_setdefault_double("network/latency-factor", 13.01);
   xbt_cfg_setdefault_double("network/bandwidth-factor", 0.97);
   xbt_cfg_setdefault_double("network/weight-S", 20537);
 
-  surf_network_model = new simgrid::surf::NetworkCm02Model(&simgrid::surf::lagrange_solve);
+  surf_network_model = new simgrid::surf::NetworkCm02Model(&simgrid::kernel::lmm::lagrange_solve);
   all_existing_models->push_back(surf_network_model);
 }
 
@@ -152,7 +152,7 @@ NetworkCm02Model::NetworkCm02Model()
     xbt_die("Unsupported optimization (%s) for this model. Accepted: Full, Lazy.", optim.c_str());
   }
 
-  maxminSystem_ = new s_lmm_system_t(selectiveUpdate_);
+  maxminSystem_ = new simgrid::kernel::lmm::s_lmm_system_t(selectiveUpdate_);
   loopback_     = NetworkCm02Model::createLink("__loopback__", 498000000, 0.000015, SURF_LINK_FATPIPE);
 
   if (getUpdateMechanism() == UM_LAZY) {
index 4752d1a..1dc1b1e 100644 (file)
@@ -7,10 +7,10 @@
 #include <utility>
 
 #include "simgrid/sg_config.h"
+#include "src/kernel/lmm/maxmin.hpp"
 #include "src/surf/HostImpl.hpp"
 #include "src/surf/network_ib.hpp"
 #include "src/surf/xml/platf.hpp"
-#include "surf/maxmin.hpp"
 #include <boost/algorithm/string/classification.hpp>
 #include <boost/algorithm/string/split.hpp>
 
index e678a32..d4ab529 100644 (file)
@@ -7,9 +7,9 @@
 #define SURF_NETWORK_INTERFACE_HPP_
 
 #include "simgrid/s4u/Link.hpp"
+#include "src/kernel/lmm/maxmin.hpp"
 #include "src/surf/PropertyHolder.hpp"
 #include "src/surf/surf_interface.hpp"
-#include "surf/maxmin.hpp"
 #include "xbt/base.h"
 #include <list>
 #include <unordered_map>
@@ -65,7 +65,7 @@ public:
    *
    * @param system The lmm_system_t to solve
    */
-  void (*f_networkSolve)(lmm_system_t) = lmm_solve;
+  void (*f_networkSolve)(lmm_system_t) = simgrid::kernel::lmm::lmm_solve;
 
   /**
    * @brief Get the right multiplicative factor for the latency.
index 9da1734..55c1e24 100644 (file)
@@ -34,8 +34,8 @@ namespace simgrid {
 namespace surf {
 
 HostL07Model::HostL07Model() : HostModel() {
-  maxminSystem_            = new s_lmm_system_t(true /* lazy */);
-  maxminSystem_->solve_fun = &bottleneck_solve;
+  maxminSystem_            = new simgrid::kernel::lmm::s_lmm_system_t(true /* lazy */);
+  maxminSystem_->solve_fun = &simgrid::kernel::lmm::bottleneck_solve;
   surf_network_model = new NetworkL07Model(this,maxminSystem_);
   surf_cpu_model_pm = new CpuL07Model(this,maxminSystem_);
 }
index f016c1e..340c601 100644 (file)
@@ -5,8 +5,8 @@
 
 #include "storage_n11.hpp"
 #include "simgrid/s4u/Engine.hpp"
+#include "src/kernel/lmm/maxmin.hpp"
 #include "src/kernel/routing/NetPoint.hpp"
-#include "surf/maxmin.hpp"
 #include <cmath> /*ceil*/
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_storage);
index 0a9aaf8..68ce738 100644 (file)
@@ -7,8 +7,8 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "simgrid/msg.h"
+#include "src/kernel/lmm/maxmin.hpp"
 #include "src/surf/surf_interface.hpp"
-#include "surf/maxmin.hpp"
 #include "xbt/log.h"
 #include "xbt/module.h"
 #include "xbt/sysdep.h"
@@ -92,11 +92,13 @@ static void test1(method_t method)
   double b = 10.0;
 
   if (method == LAGRANGE_VEGAS)
-    lmm_set_default_protocol_function(func_vegas_f, func_vegas_fp, func_vegas_fpi);
+    simgrid::kernel::lmm::lmm_set_default_protocol_function(
+        simgrid::kernel::lmm::func_vegas_f, simgrid::kernel::lmm::func_vegas_fp, simgrid::kernel::lmm::func_vegas_fpi);
   else if (method == LAGRANGE_RENO)
-    lmm_set_default_protocol_function(func_reno_f, func_reno_fpi, func_reno_fpi);
+    simgrid::kernel::lmm::lmm_set_default_protocol_function(
+        simgrid::kernel::lmm::func_reno_f, simgrid::kernel::lmm::func_reno_fpi, simgrid::kernel::lmm::func_reno_fpi);
 
-  lmm_system_t Sys    = new s_lmm_system_t(true);
+  lmm_system_t Sys    = new simgrid::kernel::lmm::s_lmm_system_t(true);
   lmm_constraint_t L1 = Sys->constraint_new(nullptr, a);
   lmm_constraint_t L2 = Sys->constraint_new(nullptr, b);
   lmm_constraint_t L3 = Sys->constraint_new(nullptr, a);
@@ -178,11 +180,13 @@ static void test1(method_t method)
 static void test2(method_t method)
 {
   if (method == LAGRANGE_VEGAS)
-    lmm_set_default_protocol_function(func_vegas_f, func_vegas_fp, func_vegas_fpi);
+    lmm_set_default_protocol_function(simgrid::kernel::lmm::func_vegas_f, simgrid::kernel::lmm::func_vegas_fp,
+                                      simgrid::kernel::lmm::func_vegas_fpi);
   if (method == LAGRANGE_RENO)
-    lmm_set_default_protocol_function(func_reno_f, func_reno_fp, func_reno_fpi);
+    lmm_set_default_protocol_function(simgrid::kernel::lmm::func_reno_f, simgrid::kernel::lmm::func_reno_fp,
+                                      simgrid::kernel::lmm::func_reno_fpi);
 
-  lmm_system_t Sys      = new s_lmm_system_t(true);
+  lmm_system_t Sys      = new simgrid::kernel::lmm::s_lmm_system_t(true);
   lmm_constraint_t CPU1 = Sys->constraint_new(nullptr, 200.0);
   lmm_constraint_t CPU2 = Sys->constraint_new(nullptr, 100.0);
 
@@ -249,11 +253,13 @@ static void test3(method_t method)
   A[14][15] =                                        1.0;
 
   if (method == LAGRANGE_VEGAS)
-    lmm_set_default_protocol_function(func_vegas_f, func_vegas_fp, func_vegas_fpi);
+    lmm_set_default_protocol_function(simgrid::kernel::lmm::func_vegas_f, simgrid::kernel::lmm::func_vegas_fp,
+                                      simgrid::kernel::lmm::func_vegas_fpi);
   if (method == LAGRANGE_RENO)
-    lmm_set_default_protocol_function(func_reno_f, func_reno_fp, func_reno_fpi);
+    lmm_set_default_protocol_function(simgrid::kernel::lmm::func_reno_f, simgrid::kernel::lmm::func_reno_fp,
+                                      simgrid::kernel::lmm::func_reno_fpi);
 
-  lmm_system_t Sys = new s_lmm_system_t(true);
+  lmm_system_t Sys = new simgrid::kernel::lmm::s_lmm_system_t(true);
 
   /* Creates the constraints */
   lmm_constraint_t* tmp_cnst = new lmm_constraint_t[15];
index be01e1d..f9d3eb3 100644 (file)
@@ -6,7 +6,7 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "surf/maxmin.hpp"
+#include "src/kernel/lmm/maxmin.hpp"
 #include "simgrid/msg.h"
 #include "xbt/module.h"
 #include "xbt/sysdep.h" /* time manipulation for benchmarking */
@@ -45,7 +45,7 @@ static void test(int nb_cnst, int nb_var, int nb_elem, unsigned int pw_base_limi
   lmm_variable_t var[nb_var];
   int used[nb_cnst];
 
-  lmm_system_t Sys = new s_lmm_system_t(true);
+  lmm_system_t Sys = new simgrid::kernel::lmm::s_lmm_system_t(true);
 
   for (int i = 0; i < nb_cnst; i++) {
     cnst[i] = Sys->constraint_new(NULL, float_random(10.0));
index a9e3259..9480a62 100644 (file)
@@ -6,8 +6,6 @@ set(EXTRA_DIST
   src/include/mc/datatypes.h
   src/include/mc/mc.h
   src/include/simgrid/sg_config.h
-  src/include/surf/datatypes.hpp
-  src/include/surf/maxmin.hpp
   src/include/surf/surf.hpp
   src/include/xbt/parmap.hpp
   src/mc/mc_mmu.hpp
@@ -303,6 +301,7 @@ set(NS3_SRC  src/surf/network_ns3.cpp
 set(SURF_SRC
   src/kernel/lmm/fair_bottleneck.cpp
   src/kernel/lmm/lagrange.cpp
+  src/kernel/lmm/maxmin.hpp
   src/kernel/lmm/maxmin.cpp
   
   src/kernel/routing/ClusterZone.cpp