diff --git a/Population.cpp b/Population.cpp index 1458be2..6e5405f 100644 --- a/Population.cpp +++ b/Population.cpp @@ -282,7 +282,7 @@ namespace BitEvolver ; // - thread_count = std::thread::hardware_concurrency(); + thread_count = this->GetThreadCountSuggestion(); // for ( i=0; ichromosomes[chromosome_index]; } + + // + int Population::GetThreadCountSuggestion() + { + // + int thread_count; + + // + thread_count = std::thread::hardware_concurrency(); + + return thread_count; + } }; diff --git a/Population.h b/Population.h index 2e0c703..828422c 100644 --- a/Population.h +++ b/Population.h @@ -89,6 +89,8 @@ namespace BitEvolver std::shared_ptr BreedChild(); std::shared_ptr PickChromosomeForBreeding(); + // + int GetThreadCountSuggestion(); }; };