]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix multithread_info when THREADS=OFF 560/head
authorTimo Heister <timo.heister@gmail.com>
Tue, 17 Feb 2015 11:33:33 +0000 (06:33 -0500)
committerTimo Heister <timo.heister@gmail.com>
Tue, 17 Feb 2015 11:33:33 +0000 (06:33 -0500)
static members have to be initialized even if deal.II is configured
without multithreading.

source/base/multithread_info.cc

index 453dee100ed26aa485ecf630d38269b7c7c6ad0f..65e0a2a7cb0cfc5a4bb4f367cc9ccb069535f332 100644 (file)
@@ -98,9 +98,6 @@ unsigned int MultithreadInfo::get_n_cpus()
 
 #  endif
 
-const unsigned int MultithreadInfo::n_cpus = MultithreadInfo::get_n_cpus();
-unsigned int MultithreadInfo::n_max_threads = numbers::invalid_unsigned_int;
-
 unsigned int MultithreadInfo::n_cores()
 {
   return MultithreadInfo::n_cpus;
@@ -210,6 +207,9 @@ MultithreadInfo::memory_consumption ()
 }
 
 
+const unsigned int MultithreadInfo::n_cpus = MultithreadInfo::get_n_cpus();
+unsigned int MultithreadInfo::n_max_threads = numbers::invalid_unsigned_int;
+
 // definition of the variable which is declared `extern' in the .h file
 MultithreadInfo multithread_info;
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.