Arcane  v4.1.3.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
ConcurrencyGlobal.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 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/* ConcurrencyGlobal.h (C) 2000-2026 */
9/* */
10/* Définitions globales de la composante 'Concurrency' de 'Arccore'. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCCORE_CONCURRENCY_CONCURRENCYGLOBAL_H
13#define ARCCORE_CONCURRENCY_CONCURRENCYGLOBAL_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22#if defined(ARCCORE_COMPONENT_arccore_concurrency)
23#define ARCCORE_CONCURRENCY_EXPORT ARCCORE_EXPORT
24#define ARCCORE_CONCURRENCY_EXTERN_TPL
25#else
26#define ARCCORE_CONCURRENCY_EXPORT ARCCORE_IMPORT
27#define ARCCORE_CONCURRENCY_EXTERN_TPL extern
28#endif
29
30/*---------------------------------------------------------------------------*/
31/*---------------------------------------------------------------------------*/
32
33namespace Arcane
34{
37class Mutex;
38class SpinLock;
39class GlobalMutex;
40class IThreadBarrier;
46class ITask;
47class TaskContext;
48class TaskFactory;
49class ITaskFunctor;
50template <typename InstanceType> class TaskFunctor;
51template <typename InstanceType> class TaskFunctorWithContext;
52
54class SpinLockImpl;
57
59class ThreadImpl;
61class MutexImpl;
62} // namespace Arcane
63
64/*---------------------------------------------------------------------------*/
65/*---------------------------------------------------------------------------*/
66
68
69/*---------------------------------------------------------------------------*/
70/*---------------------------------------------------------------------------*/
71
72namespace Arcane::Concurrency
73{
74
75/*---------------------------------------------------------------------------*/
76/*---------------------------------------------------------------------------*/
77
78extern "C++" ARCCORE_CONCURRENCY_EXPORT IThreadImplementation*
79getThreadImplementation();
80extern "C++" ARCCORE_CONCURRENCY_EXPORT IThreadImplementation*
81setThreadImplementation(IThreadImplementation* impl);
82
83/*---------------------------------------------------------------------------*/
84/*---------------------------------------------------------------------------*/
85
86extern "C++" ARCCORE_CONCURRENCY_EXPORT Ref<IThreadImplementation>
87createGlibThreadImplementation();
88
89extern "C++" ARCCORE_CONCURRENCY_EXPORT Ref<IThreadImplementation>
90createStdThreadImplementation();
91
92extern "C++" ARCCORE_CONCURRENCY_EXPORT Ref<IThreadImplementation>
93createNullThreadImplementation();
94
95/*---------------------------------------------------------------------------*/
96/*---------------------------------------------------------------------------*/
97
98} // namespace Arcane::Concurrency
99
100/*---------------------------------------------------------------------------*/
101/*---------------------------------------------------------------------------*/
102
103namespace Arccore
104{
105
106/*---------------------------------------------------------------------------*/
107/*---------------------------------------------------------------------------*/
108
109using Arcane::GlibThreadImplementation;
110using Arcane::GlobalMutex;
111using Arcane::IThreadBarrier;
112using Arcane::IThreadImplementation;
113using Arcane::Mutex;
114using Arcane::MutexImpl;
115using Arcane::NullThreadBarrier;
116using Arcane::NullThreadImplementation;
117using Arcane::SpinLock;
118using Arcane::SpinLockImpl;
119using Arcane::ThreadImpl;
120
121/*---------------------------------------------------------------------------*/
122/*---------------------------------------------------------------------------*/
123
124}
125
126/*---------------------------------------------------------------------------*/
127/*---------------------------------------------------------------------------*/
128
129namespace Arccore::Concurrency
130{
131using Arcane::Concurrency::getThreadImplementation;
132using Arcane::Concurrency::setThreadImplementation;
133using Arcane::Concurrency::createGlibThreadImplementation;
134using Arcane::Concurrency::createStdThreadImplementation;
135using Arcane::Concurrency::createNullThreadImplementation;
136}
137
138/*---------------------------------------------------------------------------*/
139/*---------------------------------------------------------------------------*/
140
141#endif
#define ARCCORE_DECLARE_REFERENCE_COUNTED_CLASS(class_name)
Macro pour déclarer qu'une classe utilise un compteur de référence.
Implémentation de ITreadImplementation avec la 'Glib'.
Interface d'un fonctor pour une tâche.
Definition Task.h:73
Implémentation d'une fabrique de tâches.
Interface d'une tâche concourante.
Definition Task.h:188
Interface d'un service implémentant le support des threads.
Implémentation d'une barrière en mono-thread.
Implémentation des threads en mode mono-thread.
Caractéristiques d'un boucle 1D multi-thread.
Definition ParallelFor.h:34
Contexte d'éxecution d'une tâche.
Definition Task.h:48
API interne à Arcane de 'TaskFactory'.
Fabrique pour les tâches.
Definition TaskFactory.h:34
Fonctor pour une tâche prenant un TaskContext en argument.
Definition Task.h:145
Fonctor sans argument pour une tâche.
Definition Task.h:100
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
Espace de nom de Arccore.