Parcourir la source

Improve examples

Eric Ramat il y a 11 ans
Parent
commit
141a9d5e19
2 fichiers modifiés avec 25 ajouts et 6 suppressions
  1. 21 2
      src/apps/main.cpp
  2. 4 4
      src/tests/mixed_tests.hpp

+ 21 - 2
src/apps/main.cpp

@@ -104,8 +104,27 @@ int main()
 
     srand(108364);
 
-    run_flat_with_heap < 200 >();
-    run_flat_with_vector < 200 >();
+    run_flat_with_heap < 10 >();
+    run_flat_with_heap < 20 >();
+    run_flat_with_heap < 30 >();
+    run_flat_with_heap < 40 >();
+    run_flat_with_heap < 50 >();
+    run_flat_with_heap < 60 >();
+    run_flat_with_heap < 70 >();
+    run_flat_with_heap < 80 >();
+    run_flat_with_heap < 90 >();
+    run_flat_with_heap < 100 >();
+
+    run_flat_with_vector < 10 >();
+    run_flat_with_vector < 20 >();
+    run_flat_with_vector < 30 >();
+    run_flat_with_vector < 40 >();
+    run_flat_with_vector < 50 >();
+    run_flat_with_vector < 60 >();
+    run_flat_with_vector < 70 >();
+    run_flat_with_vector < 80 >();
+    run_flat_with_vector < 90 >();
+    run_flat_with_vector < 100 >();
 
     double t2 = t.elapsed();
 

+ 4 - 4
src/tests/mixed_tests.hpp

@@ -553,20 +553,20 @@ public:
     Linear2GraphManager(common::Coordinator < MyTime >* coordinator) :
         pdevs::GraphManager < MyTime >(coordinator)
     {
-        for (unsigned int i = 1; i <= 100; ++i) {
+        for (unsigned int i = 1; i <= 50; ++i) {
             std::ostringstream ss;
 
             ss << "a" << i;
             _models.push_back(new pdevs::Simulator < MyTime, Beep >(ss.str()));
         }
-        for (unsigned int i = 0; i < 100; ++i) {
+        for (unsigned int i = 0; i < 50; ++i) {
             add_child(_models[i]);
         }
-        for (unsigned int i = 0; i < 99; ++i) {
+        for (unsigned int i = 0; i < 49; ++i) {
             add_link(_models[i], "out", _models[i + 1], "in");
         }
         add_link(coordinator, "in", _models[0], "in");
-        add_link(_models[99], "out", coordinator, "out");
+        add_link(_models[49], "out", coordinator, "out");
     }
 
     virtual ~Linear2GraphManager()