12#ifndef ARCCORE_COMMON_ALIGNEDMEMORYALLOCATOR_H
13#define ARCCORE_COMMON_ALIGNEDMEMORYALLOCATOR_H
17#include "arccore/common/IMemoryAllocator.h"
30 extern "C++" ARCCORE_COMMON_EXPORT
size_t
31 adjustMemoryCapacity(
size_t wanted_capacity,
size_t element_size);
44class ARCCORE_COMMON_EXPORT AlignedMemoryAllocator
49 static AlignedMemoryAllocator SimdAllocator;
50 static AlignedMemoryAllocator CacheLineAllocator;
79 static AlignedMemoryAllocator*
Simd()
81 return &SimdAllocator;
89 return &CacheLineAllocator;
95 : m_alignment(static_cast<size_t>(alignment))
Allocateur mémoire avec alignement mémoire spécifique.
size_t guaranteedAlignment(MemoryAllocationArgs) const override
Valeur de l'alignement garanti par l'allocateur.
static AlignedMemoryAllocator * CacheLine()
Allocateur garantissant l'alignement sur une ligne de cache.
eMemoryResource memoryResource() const override
Ressource mémoire fournie par l'allocateur.
static constexpr Integer simdAlignment()
Alignement pour les structures utilisant la vectorisation.
static AlignedMemoryAllocator * Simd()
Allocateur garantissant l'alignement pour utiliser la vectorisation sur la plateforme cible.
bool hasRealloc(MemoryAllocationArgs) const override
Indique si l'allocateur supporte la sémantique de realloc.
static constexpr Integer cacheLineAlignment()
Alignement pour une ligne de cache.
Informations sur une zone mémoire allouée.
Interface d'un allocateur pour la mémoire.
Classe contenant des informations pour spécialiser les allocations.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
std::int64_t Int64
Type entier signé sur 64 bits.
Int32 Integer
Type représentant un entier.
eMemoryResource
Liste des ressources mémoire disponibles.
std::int32_t Int32
Type entier signé sur 32 bits.