12#ifndef ARCCORE_COMMON_INTERNAL_MEMORYRESOURCEMNG_H
13#define ARCCORE_COMMON_INTERNAL_MEMORYRESOURCEMNG_H
17#include "arccore/base/FixedArray.h"
19#include "arccore/common/IMemoryResourceMng.h"
20#include "arccore/common/internal/IMemoryResourceMngInternal.h"
37class ARCCORE_COMMON_EXPORT MemoryResourceMng
79 std::unique_ptr<IMemoryCopier> m_default_memory_copier;
81 bool m_is_accelerator =
false;
Execution queue for an accelerator.
Constant view on a contiguous memory region containing fixed-size elements.
Interface for a memory allocator.
Interface for memory copies with accelerator support.
Interface of a memory pool.
Internal part of Arcane's 'IMemoryResourceMng'.
Memory resource management for CPUs and accelerators.
FixedArray< IMemoryPool *, ARCCORE_NB_MEMORY_RESOURCE > m_memory_pools
List of memory pools.
void setAllocator(eMemoryResource r, IMemoryAllocator *allocator) override
Sets the allocator for resource r.
void setIsAccelerator(bool v) override
Indicates if an accelerator is available.
FixedArray< IMemoryAllocator *, ARCCORE_NB_MEMORY_RESOURCE > m_allocators
List of allocators.
IMemoryPool * getMemoryPoolOrNull(eMemoryResource r) override
Memory pool for resource r.
IMemoryAllocator * getAllocator(eMemoryResource r) override
Memory allocator for resource r.
void setCopier(IMemoryCopier *copier) override
Sets the copying instance.
void setMemoryPool(eMemoryResource r, IMemoryPool *pool) override
Sets the memory pool for resource r.
IMemoryResourceMngInternal * _internal() override
Internal interface.
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.