From e01b0a11e5521bf537b883745338032c2c83942e Mon Sep 17 00:00:00 2001
From: TURPIN Laurent <laurent.turpin@inria.fr>
Date: Fri, 2 Oct 2020 18:41:58 +0200
Subject: [PATCH] [MrClean] Remove unused code from `ExpManager_7`

---
 src/libaevol/7/ExpManager_7.cpp   | 14 +-------------
 src/libaevol/7/ExpManager_7.h     | 14 --------------
 src/libaevol/world/ExpManager.cpp |  5 -----
 3 files changed, 1 insertion(+), 32 deletions(-)

diff --git a/src/libaevol/7/ExpManager_7.cpp b/src/libaevol/7/ExpManager_7.cpp
index 316c430b4..e8971287d 100644
--- a/src/libaevol/7/ExpManager_7.cpp
+++ b/src/libaevol/7/ExpManager_7.cpp
@@ -406,7 +406,7 @@ void ExpManager_7::check_selection(int indiv_id) {
 
 
 void ExpManager_7::do_mutation(int indiv_id) {
-  if (ExpManager_7::standalone() && !exp_m_->check_simd()) {
+  if (!exp_m_->check_simd()) {
 
     int x = indiv_id / exp_m_->world()->height();
     int y = indiv_id % exp_m_->world()->height();
@@ -462,15 +462,8 @@ void ExpManager_7::do_mutation(int indiv_id) {
 #endif
     auto size_after = current_individuals[indiv_id]->dna_->length_;
 
-#pragma omp atomic
-    cumulate_size += size_after;
-
-#pragma omp atomic
-    cumulate_diff += std::abs(size_after-size_before);
   } else {
 
-
-
 #pragma omp atomic
     nb_clones_++;
 
@@ -2272,9 +2265,6 @@ void ExpManager_7::run_a_step(double w_max, double selection_pressure) {
 #pragma omp single
   {
     nb_clones_ = 0;
-    cumulate_size = 0;
-    cumulate_diff = 0;
-
 
     if (exp_m_->sel()->fitness_func() == FITNESS_GLOBAL_SUM) {
 #ifdef __REGUL
@@ -2925,8 +2915,6 @@ void ExpManager_7::check_result() {
                                  ->rna_list_) {
                 printf("[%d => %d]\n", rna->begin, rna->end);
               }
-
-              validated_generation = false;
             }
             prot_cpt_b++;
           }
diff --git a/src/libaevol/7/ExpManager_7.h b/src/libaevol/7/ExpManager_7.h
index 617cfcbf9..1e1156302 100644
--- a/src/libaevol/7/ExpManager_7.h
+++ b/src/libaevol/7/ExpManager_7.h
@@ -92,8 +92,6 @@ class ExpManager_7 : public Observable{
   void update_phenotype( int indiv_id );
 #endif
 
-  void set_stats(Stats* stats) { stats_ = stats; }
-
   Individual_7** current_individuals;
   Individual_7** previous_individuals;
   Individual_7* best_indiv;
@@ -107,9 +105,6 @@ class ExpManager_7 : public Observable{
 
   DnaFactory* dna_factory_;
 
-  long cumulate_size = 0;
-  long cumulate_diff = 0;
-
   double* fitness_sum_tab_;
 #ifdef __REGUL
   Vector_Fuzzy** targets;
@@ -126,18 +121,9 @@ SIMD_PhenotypicTargetHandler_R* phenotypic_target_handler_;
   ExpManager* exp_m_;
   int* dna_size;
 
-  bool first_gener_ = true;
-
   Stats_7* stats_best = nullptr;
   Stats_7* stats_mean = nullptr;
 
-
-
-  long apply_mutation[1024];
-
-
-  Stats* stats_;
-
   void selection(int indiv_id);
 
   void check_selection(int indiv_id);
diff --git a/src/libaevol/world/ExpManager.cpp b/src/libaevol/world/ExpManager.cpp
index 3541cbc13..8800652a0 100644
--- a/src/libaevol/world/ExpManager.cpp
+++ b/src/libaevol/world/ExpManager.cpp
@@ -524,12 +524,7 @@ void ExpManager::load(gzFile& exp_s_file,
   fflush(stdout);
   output_m_->load(out_p_file, verbose, to_be_run);
   printf(" OK\n");
-  if (ExpManager_7::standalone_simd) {
 
-    if (to_be_run) {
-      exp_m_7_->set_stats(output_m_->stats());
-    }
-  }
   // -------------------------------------------- Link world and output profile
   if (record_tree()) {
       if (ExpManager_7::standalone_simd) {
-- 
GitLab