Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
IMemoryResourceMngInternal.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/* IMemoryResourceMngInternal.h (C) 2000-2025 */
9/* */
10/* Internal part of Arcane's 'IMemoryResourceMng'. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCCORE_COMMON_INTERNAL_IMEMORYRESOURCEMNGINTERNAL_H
13#define ARCCORE_COMMON_INTERNAL_IMEMORYRESOURCEMNGINTERNAL_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arccore/common/internal/IMemoryCopier.h"
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
31class ARCCORE_COMMON_EXPORT IMemoryResourceMngInternal
32{
33 public:
34
35 virtual ~IMemoryResourceMngInternal() = default;
36
37 public:
38
39 virtual void copy(ConstMemoryView from, eMemoryResource from_mem,
40 MutableMemoryView to, eMemoryResource to_mem, const RunQueue* queue) = 0;
41
42 public:
43
45 virtual void setAllocator(eMemoryResource r, IMemoryAllocator* allocator) = 0;
46
48 virtual void setMemoryPool(eMemoryResource r, IMemoryPool* pool) = 0;
49
51 virtual void setCopier(IMemoryCopier* copier) = 0;
52
54 virtual void setIsAccelerator(bool v) = 0;
55};
56
57/*---------------------------------------------------------------------------*/
58/*---------------------------------------------------------------------------*/
59
60} // namespace Arcane
61
62/*---------------------------------------------------------------------------*/
63/*---------------------------------------------------------------------------*/
64
65#endif
Constant view on a contiguous memory region containing fixed-size elements.
Interface for memory copies with accelerator support.
Interface of a memory pool.
Definition IMemoryPool.h:32
Internal part of Arcane's 'IMemoryResourceMng'.
virtual void setAllocator(eMemoryResource r, IMemoryAllocator *allocator)=0
Sets the allocator for resource r.
virtual void setMemoryPool(eMemoryResource r, IMemoryPool *pool)=0
Sets the memory pool for resource r.
virtual void setIsAccelerator(bool v)=0
Indicates if an accelerator is available.
virtual void setCopier(IMemoryCopier *copier)=0
Sets the copying instance.
Mutable view on a contiguous memory region containing fixed-size elements.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
eMemoryResource
List of available memory resources.