Reference documentation for deal.II version 9.3.3
\(\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 - 2020 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
24# include <deal.II/base/types.h>
25
26# include <memory>
27
28// forward declaration from <taskflow/taskflow.hpp>
29namespace tf
30{
31 class Executor;
32}
33
35
56{
57public:
62 MultithreadInfo() = delete;
63
71 static unsigned int
72 n_cores();
73
79 static unsigned int
80 n_threads();
81
87 static std::size_t
89
103 static void
105 const unsigned int max_threads = numbers::invalid_unsigned_int);
106
113 static bool
115
120 static void
122
123
124private:
128 static unsigned int n_max_threads;
129};
130
131
132
133//---------------------------------------------------------------------------
135// end of #ifndef dealii_multithread_info_h
136#endif
137//---------------------------------------------------------------------------
static unsigned int n_max_threads
MultithreadInfo()=delete
static bool is_running_single_threaded()
static void initialize_multithreading()
static unsigned int n_cores()
static unsigned int n_threads()
static void set_thread_limit(const unsigned int max_threads=numbers::invalid_unsigned_int)
static std::size_t memory_consumption()
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:402
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:403
static const unsigned int invalid_unsigned_int
Definition: types.h:196