Skip to content

Commit 4a2574b

Browse files
Merge pull request #1805 from arcaneframework/dev/gg-use-memory-resource-from-arccore
Remove 'eMemoryResource' from Arcane and use that from Arccore
2 parents 1b9c2cd + 3c827aa commit 4a2574b

File tree

3 files changed

+11
-30
lines changed

3 files changed

+11
-30
lines changed

Diff for: arcane/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ if (ARCANE_WANT_CHECK)
364364
set(ARCCORE_CHECK TRUE)
365365
endif()
366366

367-
set(ARCANE_ARCCORE_NEEDED_VERSION "2.7.1")
367+
set(ARCANE_ARCCORE_NEEDED_VERSION "2.8.0")
368368
if (NOT Arccore_FOUND)
369369
find_package(Arccore ${ARCANE_ARCCORE_NEEDED_VERSION} REQUIRED)
370370
endif ()

Diff for: arcane/src/arcane/utils/MemoryRessource.h

+5-28
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
22
//-----------------------------------------------------------------------------
3-
// Copyright 2000-2022 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
3+
// Copyright 2000-2024 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
44
// See the top-level COPYRIGHT file for details.
55
// SPDX-License-Identifier: Apache-2.0
66
//-----------------------------------------------------------------------------
77
/*---------------------------------------------------------------------------*/
8-
/* MemoryRessource.h (C) 2000-2022 */
8+
/* MemoryRessource.h (C) 2000-2024 */
99
/* */
1010
/* Gestion des ressources mémoire pour les CPU et accélérateurs. */
1111
/*---------------------------------------------------------------------------*/
@@ -14,9 +14,7 @@
1414
/*---------------------------------------------------------------------------*/
1515
/*---------------------------------------------------------------------------*/
1616

17-
#include "arcane/utils/ArcaneGlobal.h"
18-
19-
#include <iosfwd>
17+
#include "arcane/utils/UtilsTypes.h"
2018

2119
/*---------------------------------------------------------------------------*/
2220
/*---------------------------------------------------------------------------*/
@@ -27,29 +25,8 @@ namespace Arcane
2725
/*---------------------------------------------------------------------------*/
2826
/*---------------------------------------------------------------------------*/
2927

30-
//! Liste des ressources mémoire disponibles
31-
enum class eMemoryRessource
32-
{
33-
//! Valeur inconnue ou non initialisée
34-
Unknown = 0,
35-
//! Alloue sur l'hôte.
36-
Host,
37-
//! Alloue sur l'hôte.
38-
HostPinned,
39-
//! Alloue sur le device
40-
Device,
41-
//! Alloue en utilisant la mémoire unifiée.
42-
UnifiedMemory
43-
};
44-
45-
//! Nombre de valeurs valides pour eMemoryRessource
46-
static constexpr int NB_MEMORY_RESSOURCE = 5;
47-
48-
/*---------------------------------------------------------------------------*/
49-
/*---------------------------------------------------------------------------*/
50-
51-
extern "C++" ARCANE_UTILS_EXPORT std::ostream&
52-
operator<<(std::ostream& o,eMemoryRessource r);
28+
//! TODO: à rendre obsolète (juin 2025)
29+
static constexpr int NB_MEMORY_RESSOURCE = Arccore::ARCCORE_NB_MEMORY_RESOURCE;
5330

5431
/*---------------------------------------------------------------------------*/
5532
/*---------------------------------------------------------------------------*/

Diff for: arcane/src/arcane/utils/UtilsTypes.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,11 @@ inline constexpr Int32 DynExtent = -1;
257257
/*---------------------------------------------------------------------------*/
258258
/*---------------------------------------------------------------------------*/
259259

260-
enum class eMemoryRessource;
260+
using Arccore::eMemoryResource;
261+
//! Typedef pour la version Arcane historique (avec 2's')
262+
// TODO: A rendre obsolète (juin 2025)
263+
using eMemoryRessource = Arccore::eMemoryResource;
264+
261265
class DefaultLayout;
262266
template<int RankValue> class RightLayoutN;
263267
template<int RankValue> class LeftLayoutN;

0 commit comments

Comments
 (0)