Arcane
v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
utils/Atomic.h
1
// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2
//-----------------------------------------------------------------------------
3
// Copyright 2000-2024 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
/* Atomic.h (C) 2000-2024 */
9
/* */
10
/* Types atomiques pour le multi-threading. */
11
/*---------------------------------------------------------------------------*/
12
#ifndef ARCANE_UTILS_ATOMIC_H
13
#define ARCANE_UTILS_ATOMIC_H
14
/*---------------------------------------------------------------------------*/
15
/*---------------------------------------------------------------------------*/
16
17
#include "
arcane/utils/ArcaneGlobal.h
"
18
19
/*---------------------------------------------------------------------------*/
20
/*---------------------------------------------------------------------------*/
21
22
namespace
Arcane
23
{
24
25
/*---------------------------------------------------------------------------*/
26
/*---------------------------------------------------------------------------*/
33
class
ARCANE_UTILS_EXPORT
AtomicInt32
34
{
35
public
:
36
38
ARCANE_DEPRECATED_REASON(
"Y2022: Use std::atomic<Int32> instead"
)
39
AtomicInt32
() {}
40
ARCANE_DEPRECATED_REASON(
"Y2022: Use std::atomic<Int32> instead"
)
41
AtomicInt32
(Int32);
42
43
public
:
44
45
Int32
operator
++();
46
Int32
operator
--();
47
Int32 value() const;
48
void
operator
=(Int32 v);
49
50
ARCANE_DEPRECATED_REASON("
Y2022
: Use std::
atomic
<Int32>::
fetch_add
(1)
instead
")
51
static
Int32 increment(
volatile
Int32* v);
52
53
ARCANE_DEPRECATED_REASON("
Y2022
: Use std::
atomic
<Int32>::
fetch_sub
(1)
instead
")
54
static
Int32 decrement(
volatile
Int32* v);
55
56
ARCANE_DEPRECATED_REASON("
Y2022
: Use std::
atomic
<Int32>::
store
()
instead
")
57
static
void
setValue(
volatile
Int32* v, Int32
new_v
);
58
59
ARCANE_DEPRECATED_REASON("
Y2022
: Use std::
atomic
<Int32>::load()
instead
")
60
static
Int32 getValue(
volatile
Int32* v);
61
62
private
:
63
64
mutable
Int32 m_value;
65
};
66
67
/*---------------------------------------------------------------------------*/
68
/*---------------------------------------------------------------------------*/
69
70
}
// namespace Arcane
71
72
/*---------------------------------------------------------------------------*/
73
/*---------------------------------------------------------------------------*/
74
75
#endif
ArcaneGlobal.h
Fichier de configuration d'Arcane.
Arcane::AtomicInt32
Type 'Int32' atomique.
Definition
utils/Atomic.h:34
Arcane::ItemLocalIdListViewT
Vue typée sur une liste d'entités d'une connectivité.
Definition
ItemLocalIdListView.h:229
Arcane::LimaWrapper
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition
Lima.cc:120
Arcane
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
Definition
AcceleratorGlobal.h:36
arcane
utils
Atomic.h
Généré le Lundi 18 Novembre 2024 03:00:01 pour Arcane par
1.9.8