Arcane  v4.1.0.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
ConcurrencyBase.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2025 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* ConcurrencyBase.h (C) 2000-2025 */
9/* */
10/* Classes de base pour la gestion du multi-threading. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCCORE_BASE_CONCURRENCYBASE_H
13#define ARCCORE_BASE_CONCURRENCYBASE_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arccore/base/ParallelLoopOptions.h"
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
30class ARCCORE_BASE_EXPORT ConcurrencyBase
31{
32 // Pour appeler _setMaxAllowedThread.
33 friend class TBBTaskImplementation;
34
35 public:
36
43 static Int32 maxAllowedThread() { return m_max_allowed_thread; }
44
45 public:
46
49 {
50 m_default_loop_options = v;
51 }
52
55 {
56 return m_default_loop_options;
57 }
58
59 private:
60
61 static Int32 m_max_allowed_thread;
62 static ParallelLoopOptions m_default_loop_options;
63
64 private:
65
66 static void _setMaxAllowedThread(Int32 v);
67};
68
69/*---------------------------------------------------------------------------*/
70/*---------------------------------------------------------------------------*/
71
72} // End namespace Arcane
73
74/*---------------------------------------------------------------------------*/
75/*---------------------------------------------------------------------------*/
76
77#endif
Informations de base pour la gestion du multi-threading.
static void setDefaultParallelLoopOptions(const ParallelLoopOptions &v)
Positionne les valeurs par défaut d'exécution d'une boucle parallèle.
static Int32 maxAllowedThread()
Nombre maximum de threads autorisés pour le multi-threading.
static const ParallelLoopOptions & defaultParallelLoopOptions()
Valeurs par défaut d'exécution d'une boucle parallèle.
Options d'exécution d'une boucle parallèle en multi-thread.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
std::int32_t Int32
Type entier signé sur 32 bits.