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"
41class ARCCORE_COMMON_EXPORT ArrayMetaData
47 template <
typename>
friend class AbstractArray;
48 template <
typename>
friend class Array2;
49 template <
typename>
friend class Array;
50 template <
typename>
friend class SharedArray;
51 template <
typename>
friend class SharedArray2;
52 friend class AbstractArrayBase;
90 static void throwInvalidMetaDataForSharedArray ARCCORE_NORETURN();
91 static void throwNullExpected ARCCORE_NORETURN();
92 static void throwNotNullExpected ARCCORE_NORETURN();
93 static void throwUnsupportedSpecificAllocator ARCCORE_NORETURN();
94 static void overlapError ARCCORE_NORETURN(
const void* begin1,
Int64 size1,
95 const void* begin2,
Int64 size2);
99 using MemoryPointer =
void*;
100 using ConstMemoryPointer =
const void*;
110 _allocator()->deallocate(alloc_args, mem_info);
113 MemoryPointer _changeAllocator(
const MemoryAllocationOptions& new_allocator_opt,
const AllocatedMemoryInfo& current_info, Int64 sizeof_true_type, RunQueue* queue);
114 void _setMemoryLocationHint(eMemoryLocationHint new_hint,
void* ptr, Int64 sizeof_true_type);
115 void _setHostDeviceMemoryLocation(eHostDeviceMemoryLocation location);
116 void _copyFromMemory(MemoryPointer destination, ConstMemoryPointer source, Int64 sizeof_true_type, RunQueue* queue);
120 void _checkAllocator()
const;
121 MemoryAllocationArgs _getAllocationArgs()
const {
return allocation_options.
allocationArgs(); }
122 MemoryAllocationArgs _getAllocationArgs(RunQueue* queue)
const
File d'exécution pour un accélérateur.
Informations sur une zone mémoire allouée.
Ce type n'est plus utilisé.
Cette classe n'est plus utilisée.
Interface d'un allocateur pour la mémoire.
Classe contenant des informations pour spécialiser les allocations.
Options pour configurer les allocations.
MemoryAllocationArgs allocationArgs(RunQueue *queue=nullptr) const
Arguments pour 'IMemoryAllocator' associés à ces options et à la file queue.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
std::int64_t Int64
Type entier signé sur 64 bits.
eHostDeviceMemoryLocation
Localisation physique d'une adresse mémoire.
@ Unknown
Localisation inconnue.
std::int32_t Int32
Type entier signé sur 32 bits.