12#ifndef ARCANE_UTILS_MEMORYUTILS_H
13#define ARCANE_UTILS_MEMORYUTILS_H
19#include "arccore/common/MemoryAllocationArgs.h"
20#include "arccore/common/MemoryUtils.h"
35extern "C++" ARCANE_DEPRECATED_REASON(
"Y2024: Use getDefaultDataAllocator() instead.")
36ARCANE_UTILS_EXPORT IMemoryAllocator*
45 extern "C++" ARCANE_UTILS_EXPORT
Int64
46 computeCapacity(
Int64 size);
64template <
typename DataType>
inline Int32
68 Int64 s = array.largeSize();
69 if (new_size > s || force_resize) {
71 if (new_size > array.capacity()) {
75 array.resize(new_size);
87template <
typename DataType>
inline Int32
Int64 computeCapacity(Int64 size)
Calcule une capacité adaptée pour une taille de size.
Déclarations des types utilisés dans Arcane.
Espace de noms pour les fonctions de gestion mémoire et des allocateurs.
Int32 checkResizeArrayWithCapacity(Array< DataType > &array, Int64 new_size, bool force_resize)
Redimensionne un tableau en ajoutant une réserve de mémoire.
IMemoryAllocator * getAcceleratorHostMemoryAllocator()
Allocateur spécifique pour les accélérateurs.
std::int64_t Int64
Type entier signé sur 64 bits.
std::int32_t Int32
Type entier signé sur 32 bits.