Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::IMemoryResourceMng Class Referenceabstract

Memory resource management for CPUs and accelerators. More...

#include </__w/arcaneframework.github.io/arcaneframework.github.io/framework/arccore/src/common/arccore/common/IMemoryResourceMng.h>

Inheritance diagram for Arcane::IMemoryResourceMng:
Collaboration diagram for Arcane::IMemoryResourceMng:

Public Member Functions

virtual IMemoryAllocatorgetAllocator (eMemoryResource r)=0
 Memory allocator for resource r.
virtual IMemoryAllocatorgetAllocator (eMemoryResource r, bool throw_if_not_found)=0
 Memory allocator for resource r.
virtual IMemoryPoolgetMemoryPoolOrNull (eMemoryResource r)=0
 Memory pool for resource r.
virtual IMemoryResourceMngInternal_internal ()=0
 Internal interface.

Detailed Description

Memory resource management for CPUs and accelerators.

Definition at line 32 of file IMemoryResourceMng.h.

Member Function Documentation

◆ _internal()

virtual IMemoryResourceMngInternal * Arcane::IMemoryResourceMng::_internal ( )
pure virtual

Internal interface.

Implemented in Arcane::MemoryResourceMng.

Referenced by Arcane::MemoryUtils::copy(), and Arcane::MemoryResourceMng::genericCopy().

Here is the caller graph for this function:

◆ getAllocator() [1/2]

virtual IMemoryAllocator * Arcane::IMemoryResourceMng::getAllocator ( eMemoryResource r)
pure virtual

Memory allocator for resource r.

Throws an exception if no allocator for resource v exists.

Implemented in Arcane::MemoryResourceMng.

Referenced by Arcane::MemoryUtils::getDeviceOrHostAllocator().

Here is the caller graph for this function:

◆ getAllocator() [2/2]

virtual IMemoryAllocator * Arcane::IMemoryResourceMng::getAllocator ( eMemoryResource r,
bool throw_if_not_found )
pure virtual

Memory allocator for resource r.

If no allocator for resource v exists, throws an exception if throw_if_not_found is true or returns nullptr if throw_if_not_found is false.

Implemented in Arcane::MemoryResourceMng.

◆ getMemoryPoolOrNull()

virtual IMemoryPool * Arcane::IMemoryResourceMng::getMemoryPoolOrNull ( eMemoryResource r)
pure virtual

Memory pool for resource r.

Returns the memory pool associated with resource v or nullptr if there is none.

Implemented in Arcane::MemoryResourceMng.


The documentation for this class was generated from the following file: