Reference documentation for deal.II version 9.2.0
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
multithread_info.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2000 - 2018 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii_multithread_info_h
17 # define dealii_multithread_info_h
18 //---------------------------------------------------------------------------
19 
20 
21 # include <deal.II/base/config.h>
22 
23 # include <deal.II/base/exceptions.h>
24 # include <deal.II/base/types.h>
25 
27 
49 {
50 public:
55  MultithreadInfo() = delete;
56 
66  static unsigned int
67  n_cores();
68 
74  static unsigned int
75  n_threads();
76 
82  static std::size_t
84 
98  static void
100  const unsigned int max_threads = numbers::invalid_unsigned_int);
101 
108  static bool
110 
115  static void
117 
118 private:
124  static unsigned int
125  get_n_cpus();
126 
130  static unsigned int n_max_threads;
131 
136  static const unsigned int n_cpus;
137 };
138 
139 
140 
141 //---------------------------------------------------------------------------
143 // end of #ifndef dealii_multithread_info_h
144 #endif
145 //---------------------------------------------------------------------------
MultithreadInfo::n_max_threads
static unsigned int n_max_threads
Definition: multithread_info.h:130
MultithreadInfo::get_n_cpus
static unsigned int get_n_cpus()
Definition: multithread_info.cc:101
MultithreadInfo::n_threads
static unsigned int n_threads()
Definition: multithread_info.cc:169
types.h
MultithreadInfo::MultithreadInfo
MultithreadInfo()=delete
MultithreadInfo::n_cpus
static const unsigned int n_cpus
Definition: multithread_info.h:136
MultithreadInfo::n_cores
static unsigned int n_cores()
Definition: multithread_info.cc:109
MultithreadInfo::memory_consumption
static std::size_t memory_consumption()
Definition: multithread_info.cc:211
DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:358
MultithreadInfo
Definition: multithread_info.h:48
MultithreadInfo::is_running_single_threaded
static bool is_running_single_threaded()
Definition: multithread_info.cc:204
exceptions.h
MultithreadInfo::initialize_multithreading
static void initialize_multithreading()
Definition: multithread_info.cc:220
numbers::invalid_unsigned_int
static const unsigned int invalid_unsigned_int
Definition: types.h:191
config.h
DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:359
MultithreadInfo::set_thread_limit
static void set_thread_limit(const unsigned int max_threads=numbers::invalid_unsigned_int)
Definition: multithread_info.cc:116