Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
Arcane::ArrayMetaData Class Reference

Static Public Member Functions

static void throwInvalidMetaDataForSharedArray ARCCORE_NORETURN ()
static void throwNullExpected ARCCORE_NORETURN ()
static void throwNotNullExpected ARCCORE_NORETURN ()
static void throwUnsupportedSpecificAllocator ARCCORE_NORETURN ()
static void overlapError ARCCORE_NORETURN (const void *begin1, Int64 size1, const void *begin2, Int64 size2)

Protected Types

using MemoryPointer = void*
using ConstMemoryPointer = const void*

Protected Member Functions

IMemoryAllocator_allocator () const
MemoryPointer _allocate (Int64 nb, Int64 sizeof_true_type, RunQueue *queue)
MemoryPointer _reallocate (const AllocatedMemoryInfo &mem_info, Int64 new_capacity, Int64 sizeof_true_type, RunQueue *queue)
void _deallocate (const AllocatedMemoryInfo &mem_info, RunQueue *queue) noexcept
MemoryPointer _changeAllocator (const MemoryAllocationOptions &new_allocator_opt, const AllocatedMemoryInfo &current_info, Int64 sizeof_true_type, RunQueue *queue)
void _setMemoryLocationHint (eMemoryLocationHint new_hint, void *ptr, Int64 sizeof_true_type)
void _setHostDeviceMemoryLocation (eHostDeviceMemoryLocation location)
void _copyFromMemory (MemoryPointer destination, ConstMemoryPointer source, Int64 sizeof_true_type, RunQueue *queue)

Protected Attributes

Int64 size = 0
 Number of elements in the array (for 1D arrays).
Int64 dim1_size = 0
 Size of the first dimension (for 2D arrays).
Int64 dim2_size = 0
 Size of the second dimension (for 2D arrays).
Int64 capacity = 0
 Number of allocated elements.
MemoryAllocationOptions allocation_options
 Memory allocator and associated options.
Int32 nb_ref = 0
 Number of references on the instance.
eHostDeviceMemoryLocation m_host_device_memory_location = eHostDeviceMemoryLocation::Unknown
 Information about the physical location of the memory (if known).
bool is_allocated_by_new = false
 Indicates if this instance was allocated by the new operator.
bool is_not_null = false
 Indicates if this instance is not the null instance (shared by all SharedArray).
bool is_collective_allocator = false
 Indicates if calls to the allocator must be performed collectively.

Friends

template<typename>
class AbstractArray
template<typename>
class Array2
template<typename>
class Array
template<typename>
class SharedArray
template<typename>
class SharedArray2
class AbstractArrayBase

Detailed Description

Definition at line 42 of file ArrayMetaData.h.

Member Typedef Documentation

◆ ConstMemoryPointer

using Arcane::ArrayMetaData::ConstMemoryPointer = const void*
protected

Definition at line 101 of file ArrayMetaData.h.

◆ MemoryPointer

using Arcane::ArrayMetaData::MemoryPointer = void*
protected

Definition at line 100 of file ArrayMetaData.h.

Constructor & Destructor Documentation

◆ ArrayMetaData()

Arcane::ArrayMetaData::ArrayMetaData ( )
inline

Definition at line 58 of file ArrayMetaData.h.

Member Function Documentation

◆ _allocate()

ArrayMetaData::MemoryPointer Arcane::ArrayMetaData::_allocate ( Int64 nb,
Int64 sizeof_true_type,
RunQueue * queue )
protected

Definition at line 120 of file arccore/src/common/arccore/common/Array.cc.

◆ _allocator()

IMemoryAllocator * Arcane::ArrayMetaData::_allocator ( ) const
inlineprotected

Definition at line 87 of file ArrayMetaData.h.

◆ _changeAllocator()

ArrayMetaData::MemoryPointer Arcane::ArrayMetaData::_changeAllocator ( const MemoryAllocationOptions & new_allocator_opt,
const AllocatedMemoryInfo & current_info,
Int64 sizeof_true_type,
RunQueue * queue )
protected

Definition at line 205 of file arccore/src/common/arccore/common/Array.cc.

◆ _copyFromMemory()

void Arcane::ArrayMetaData::_copyFromMemory ( MemoryPointer destination,
ConstMemoryPointer source,
Int64 sizeof_true_type,
RunQueue * queue )
protected

Definition at line 107 of file arccore/src/common/arccore/common/Array.cc.

◆ _deallocate()

void Arcane::ArrayMetaData::_deallocate ( const AllocatedMemoryInfo & mem_info,
RunQueue * queue )
inlineprotectednoexcept

Definition at line 107 of file ArrayMetaData.h.

◆ _reallocate()

ArrayMetaData::MemoryPointer Arcane::ArrayMetaData::_reallocate ( const AllocatedMemoryInfo & mem_info,
Int64 new_capacity,
Int64 sizeof_true_type,
RunQueue * queue )
protected

Definition at line 153 of file arccore/src/common/arccore/common/Array.cc.

◆ _setHostDeviceMemoryLocation()

void Arcane::ArrayMetaData::_setHostDeviceMemoryLocation ( eHostDeviceMemoryLocation location)
protected

Definition at line 98 of file arccore/src/common/arccore/common/Array.cc.

◆ _setMemoryLocationHint()

void Arcane::ArrayMetaData::_setMemoryLocationHint ( eMemoryLocationHint new_hint,
void * ptr,
Int64 sizeof_true_type )
protected

Definition at line 85 of file arccore/src/common/arccore/common/Array.cc.

◆ AbstractArray

template<typename>
friend class AbstractArray
friend

Definition at line 48 of file ArrayMetaData.h.

◆ AbstractArrayBase

friend class AbstractArrayBase
friend

Definition at line 53 of file ArrayMetaData.h.

◆ Array

template<typename>
friend class Array
friend

Definition at line 50 of file ArrayMetaData.h.

◆ Array2

template<typename>
friend class Array2
friend

Definition at line 49 of file ArrayMetaData.h.

◆ SharedArray

template<typename>
friend class SharedArray
friend

Definition at line 51 of file ArrayMetaData.h.

◆ SharedArray2

template<typename>
friend class SharedArray2
friend

Definition at line 52 of file ArrayMetaData.h.

Member Data Documentation

◆ allocation_options

MemoryAllocationOptions Arcane::ArrayMetaData::allocation_options
protected

Memory allocator and associated options.

Definition at line 73 of file ArrayMetaData.h.

Referenced by Arcane::Array2< T >::setDebugName().

◆ capacity

Int64 Arcane::ArrayMetaData::capacity = 0
protected

Number of allocated elements.

Definition at line 71 of file ArrayMetaData.h.

◆ dim1_size

Int64 Arcane::ArrayMetaData::dim1_size = 0
protected

Size of the first dimension (for 2D arrays).

Definition at line 67 of file ArrayMetaData.h.

◆ dim2_size

Int64 Arcane::ArrayMetaData::dim2_size = 0
protected

Size of the second dimension (for 2D arrays).

Definition at line 69 of file ArrayMetaData.h.

◆ is_allocated_by_new

bool Arcane::ArrayMetaData::is_allocated_by_new = false
protected

Indicates if this instance was allocated by the new operator.

Definition at line 79 of file ArrayMetaData.h.

◆ is_collective_allocator

bool Arcane::ArrayMetaData::is_collective_allocator = false
protected

Indicates if calls to the allocator must be performed collectively.

Definition at line 83 of file ArrayMetaData.h.

◆ is_not_null

bool Arcane::ArrayMetaData::is_not_null = false
protected

Indicates if this instance is not the null instance (shared by all SharedArray).

Definition at line 81 of file ArrayMetaData.h.

◆ m_host_device_memory_location

eHostDeviceMemoryLocation Arcane::ArrayMetaData::m_host_device_memory_location = eHostDeviceMemoryLocation::Unknown
protected

Information about the physical location of the memory (if known).

Definition at line 77 of file ArrayMetaData.h.

◆ nb_ref

Int32 Arcane::ArrayMetaData::nb_ref = 0
protected

Number of references on the instance.

Definition at line 75 of file ArrayMetaData.h.

◆ size

Int64 Arcane::ArrayMetaData::size = 0
protected

Number of elements in the array (for 1D arrays).

Definition at line 65 of file ArrayMetaData.h.


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