From 55fd0e82d2abd259e0fa122caf28141ad1e8cae1 Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Wed, 18 Nov 2015 11:44:33 -0500 Subject: [PATCH] remove deprecated MultithreadInfo code --- include/deal.II/base/multithread_info.h | 38 +++++++++---------------- source/base/multithread_info.cc | 3 -- 2 files changed, 14 insertions(+), 27 deletions(-) diff --git a/include/deal.II/base/multithread_info.h b/include/deal.II/base/multithread_info.h index 640d791000..913980f6e3 100644 --- a/include/deal.II/base/multithread_info.h +++ b/include/deal.II/base/multithread_info.h @@ -36,7 +36,7 @@ DEAL_II_NAMESPACE_OPEN * Building Blocks library. See * @ref threads * for more information on this. Thread-based parallel methods need to - * explicitly created threads and may want to use a number of threads that is + * explicitly create threads and may want to use a number of threads that is * related to the number of CPUs in your system. The recommended number of * threads can be queried using MultithreadInfo::n_threads(), while the number * of cores in the system is returned by MultithreadInfo::n_cores(). @@ -58,15 +58,10 @@ public: */ static unsigned int n_cores (); - /** - * @deprecated Use n_cores() instead. - */ - static const unsigned int n_cpus DEAL_II_DEPRECATED; - /** * Returns the number of threads to use. This is initially set to the number * of cores the system has (see n_cores()) but can be further restricted by - * set_thread_limit(). + * set_thread_limit() and the environment variable DEAL_II_NUM_THREADS. */ static unsigned int n_threads (); @@ -104,13 +99,14 @@ public: */ DeclException0(ExcProcNotPresent); +private: + + /** - * @deprecated All members are static, so there is no need to construct an - * instance. + * Constructor made private because no instance of this class needs to + * be constructed as all members are static. */ - MultithreadInfo () DEAL_II_DEPRECATED; - -private: + MultithreadInfo (); /** * Private function to determine the number of CPUs. Implementation for @@ -123,19 +119,13 @@ private: * Variable representing the maximum number of threads. */ static unsigned int n_max_threads; -}; - - - -/** - * Global variable of type MultithreadInfo. - * - * @deprecated Use the static member functions instead. - * - * @ingroup threads - */ -extern MultithreadInfo multithread_info DEAL_II_DEPRECATED; + /** + * Variable representing the number of cores in the system. This is computed by + * get_n_cpus() and is returned by n_cores(). + */ + static const unsigned int n_cpus; +}; diff --git a/source/base/multithread_info.cc b/source/base/multithread_info.cc index 7aba73f4b0..6e5d146c0f 100644 --- a/source/base/multithread_info.cc +++ b/source/base/multithread_info.cc @@ -205,9 +205,6 @@ 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; - namespace { // Force the first call to set_thread_limit happen before any tasks in TBB are -- 2.39.5