Arcane  v4.1.0.0
Documentation utilisateur
Chargement...
Recherche...
Aucune correspondance
ConcurrencyGlobal.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/* ConcurrencyGlobal.h (C) 2000-2025 */
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{
36class Mutex;
37class SpinLock;
38class GlobalMutex;
39class IThreadBarrier;
43class TaskFactoryInternal;
45class ITask;
46class TaskContext;
47class TaskFactory;
48class ITaskFunctor;
49template <typename InstanceType> class TaskFunctor;
50template <typename InstanceType> class TaskFunctorWithContext;
51
52//@{ Classe internes à Arccore/Arcane
53class SpinLockImpl;
55//@}
56
57//! Classe opaque encapsulant l'implementation des threads
58class ThreadImpl;
59//! Classe opaque encapsulant l'implementation d'un mutex
60class MutexImpl;
61} // namespace Arcane
62
63/*---------------------------------------------------------------------------*/
64/*---------------------------------------------------------------------------*/
65
67
68/*---------------------------------------------------------------------------*/
69/*---------------------------------------------------------------------------*/
70
71namespace Arcane::Concurrency
72{
73
74/*---------------------------------------------------------------------------*/
75/*---------------------------------------------------------------------------*/
76
77extern "C++" ARCCORE_CONCURRENCY_EXPORT IThreadImplementation*
78getThreadImplementation();
79extern "C++" ARCCORE_CONCURRENCY_EXPORT IThreadImplementation*
80setThreadImplementation(IThreadImplementation* impl);
81
82/*---------------------------------------------------------------------------*/
83/*---------------------------------------------------------------------------*/
84
85extern "C++" ARCCORE_CONCURRENCY_EXPORT Ref<IThreadImplementation>
86createGlibThreadImplementation();
87
88extern "C++" ARCCORE_CONCURRENCY_EXPORT Ref<IThreadImplementation>
89createStdThreadImplementation();
90
91extern "C++" ARCCORE_CONCURRENCY_EXPORT Ref<IThreadImplementation>
92createNullThreadImplementation();
93
94/*---------------------------------------------------------------------------*/
95/*---------------------------------------------------------------------------*/
96
97} // namespace Arcane::Concurrency
98
99/*---------------------------------------------------------------------------*/
100/*---------------------------------------------------------------------------*/
101
102namespace Arccore
103{
104
105/*---------------------------------------------------------------------------*/
106/*---------------------------------------------------------------------------*/
107
108using Arcane::GlibThreadImplementation;
109using Arcane::GlobalMutex;
110using Arcane::IThreadBarrier;
111using Arcane::IThreadImplementation;
112using Arcane::Mutex;
113using Arcane::MutexImpl;
114using Arcane::NullThreadBarrier;
115using Arcane::NullThreadImplementation;
116using Arcane::SpinLock;
117using Arcane::SpinLockImpl;
118using Arcane::ThreadImpl;
119
120/*---------------------------------------------------------------------------*/
121/*---------------------------------------------------------------------------*/
122
123}
124
125/*---------------------------------------------------------------------------*/
126/*---------------------------------------------------------------------------*/
127
128namespace Arccore::Concurrency
129{
130using Arcane::Concurrency::getThreadImplementation;
131using Arcane::Concurrency::setThreadImplementation;
132using Arcane::Concurrency::createGlibThreadImplementation;
133using Arcane::Concurrency::createStdThreadImplementation;
134using Arcane::Concurrency::createNullThreadImplementation;
135}
136
137/*---------------------------------------------------------------------------*/
138/*---------------------------------------------------------------------------*/
139
140#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'une tâche concourante.
Definition Task.h:186
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:46
Fabrique pour les tâches.
Definition TaskFactory.h:34
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
Espace de nom de Arccore.