Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove 'eMemoryResource' from Arcane and use that from Arccore #1805

Merged
merged 2 commits into from
Nov 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion arcane/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ if (ARCANE_WANT_CHECK)
set(ARCCORE_CHECK TRUE)
endif()

set(ARCANE_ARCCORE_NEEDED_VERSION "2.7.1")
set(ARCANE_ARCCORE_NEEDED_VERSION "2.8.0")
if (NOT Arccore_FOUND)
find_package(Arccore ${ARCANE_ARCCORE_NEEDED_VERSION} REQUIRED)
endif ()
Expand Down
33 changes: 5 additions & 28 deletions arcane/src/arcane/utils/MemoryRessource.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
//-----------------------------------------------------------------------------
// Copyright 2000-2022 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
// Copyright 2000-2024 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
// See the top-level COPYRIGHT file for details.
// SPDX-License-Identifier: Apache-2.0
//-----------------------------------------------------------------------------
/*---------------------------------------------------------------------------*/
/* MemoryRessource.h (C) 2000-2022 */
/* MemoryRessource.h (C) 2000-2024 */
/* */
/* Gestion des ressources mémoire pour les CPU et accélérateurs. */
/*---------------------------------------------------------------------------*/
Expand All @@ -14,9 +14,7 @@
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/

#include "arcane/utils/ArcaneGlobal.h"

#include <iosfwd>
#include "arcane/utils/UtilsTypes.h"

/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
Expand All @@ -27,29 +25,8 @@ namespace Arcane
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/

//! Liste des ressources mémoire disponibles
enum class eMemoryRessource
{
//! Valeur inconnue ou non initialisée
Unknown = 0,
//! Alloue sur l'hôte.
Host,
//! Alloue sur l'hôte.
HostPinned,
//! Alloue sur le device
Device,
//! Alloue en utilisant la mémoire unifiée.
UnifiedMemory
};

//! Nombre de valeurs valides pour eMemoryRessource
static constexpr int NB_MEMORY_RESSOURCE = 5;

/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/

extern "C++" ARCANE_UTILS_EXPORT std::ostream&
operator<<(std::ostream& o,eMemoryRessource r);
//! TODO: à rendre obsolète (juin 2025)
static constexpr int NB_MEMORY_RESSOURCE = Arccore::ARCCORE_NB_MEMORY_RESOURCE;

/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
Expand Down
6 changes: 5 additions & 1 deletion arcane/src/arcane/utils/UtilsTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,11 @@ inline constexpr Int32 DynExtent = -1;
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/

enum class eMemoryRessource;
using Arccore::eMemoryResource;
//! Typedef pour la version Arcane historique (avec 2's')
// TODO: A rendre obsolète (juin 2025)
using eMemoryRessource = Arccore::eMemoryResource;

class DefaultLayout;
template<int RankValue> class RightLayoutN;
template<int RankValue> class LeftLayoutN;
Expand Down
Loading