12#ifndef ARCCORE_COMMON_ARRAYMETADATA_H
13#define ARCCORE_COMMON_ARRAYMETADATA_H
17#include "arccore/common/MemoryAllocationOptions.h"
18#include "arccore/common/MemoryAllocationArgs.h"
19#include "arccore/common/IMemoryAllocator.h"
20#include "arccore/common/AllocatedMemoryInfo.h"
42class ARCCORE_COMMON_EXPORT ArrayMetaData
48 template <
typename>
friend class AbstractArray;
49 template <
typename>
friend class Array2;
50 template <
typename>
friend class Array;
51 template <
typename>
friend class SharedArray;
52 template <
typename>
friend class SharedArray2;
53 friend class AbstractArrayBase;
91 static void throwInvalidMetaDataForSharedArray ARCCORE_NORETURN();
92 static void throwNullExpected ARCCORE_NORETURN();
93 static void throwNotNullExpected ARCCORE_NORETURN();
94 static void throwUnsupportedSpecificAllocator ARCCORE_NORETURN();
95 static void overlapError ARCCORE_NORETURN(
const void* begin1,
Int64 size1,
96 const void* begin2,
Int64 size2);
100 using MemoryPointer =
void*;
101 using ConstMemoryPointer =
const void*;
111 _allocator()->deallocate(alloc_args, mem_info);
114 MemoryPointer _changeAllocator(
const MemoryAllocationOptions& new_allocator_opt,
const AllocatedMemoryInfo& current_info, Int64 sizeof_true_type, RunQueue* queue);
115 void _setMemoryLocationHint(eMemoryLocationHint new_hint,
void* ptr, Int64 sizeof_true_type);
116 void _setHostDeviceMemoryLocation(eHostDeviceMemoryLocation location);
117 void _copyFromMemory(MemoryPointer destination, ConstMemoryPointer source, Int64 sizeof_true_type, RunQueue* queue);
121 void _checkAllocator()
const;
122 MemoryAllocationArgs _getAllocationArgs()
const {
return allocation_options.
allocationArgs(); }
123 MemoryAllocationArgs _getAllocationArgs(RunQueue* queue)
const
Execution queue for an accelerator.
Information about an allocated memory region.
This type is no longer used.
This class is no longer used.
Interface for a memory allocator.
Class containing information to specialize allocations.
Options to configure allocations.
MemoryAllocationArgs allocationArgs(RunQueue *queue=nullptr) const
Arguments for 'IMemoryAllocator' associated with these options and the queue.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
std::int64_t Int64
Signed integer type of 64 bits.
eHostDeviceMemoryLocation
Physical location of a memory address.
@ Unknown
Unknown location.
std::int32_t Int32
Signed integer type of 32 bits.