Classe commune pour gérer l'allocation par bloc. Plus de détails...
Graphe de collaboration de Arcane::Accelerator::BlockAllocatorWrapper:Fonctions membres publiques | |
| void | initialize (Int64 block_size, bool do_block_alloc) |
| void | dumpStats (std::ostream &ostr, const String &name) |
| Int64 | adjustedCapacity (Int64 wanted_capacity, Int64 element_size) const |
| void | notifyDoAllocate (void *ptr) |
Fonctions membres privées statiques | |
| static Int64 | _computeNextMultiple (Int64 n, Int64 multiple) |
Attributs privés | |
| Int64 | m_block_size = 128 |
| Taille d'un bloc. L'allocation sera un multiple de cette taille. | |
| bool | m_do_block_allocate = true |
| Indique si l'allocation en utilisant m_block_size. | |
| std::atomic< Int32 > | m_nb_allocate = 0 |
| Nombre d'allocations. | |
| std::atomic< Int32 > | m_nb_unaligned_allocate = 0 |
| Nombre d'allocations non alignées. | |
Classe commune pour gérer l'allocation par bloc.
Cette classe permet de garantir qu'on alloue la mémoire sur des multiples de la taille d'un bloc. Cela est notamment utilisé pour la mémoire unifiée ce qui permet d'éviter des effets de bord entre les allocations pour les transferts entre l'accélérateur CPU et l'hôte.
Par défaut on alloue un multiple de 128 octets.
Définition à la ligne 49 du fichier AcceleratorMemoryAllocatorBase.h.
|
inlinestaticprivate |
Définition à la ligne 118 du fichier AcceleratorMemoryAllocatorBase.h.
|
inline |
Définition à la ligne 63 du fichier AcceleratorMemoryAllocatorBase.h.
| void Arcane::Accelerator::BlockAllocatorWrapper::dumpStats | ( | std::ostream & | ostr, |
| const String & | name ) |
Définition à la ligne 32 du fichier AcceleratorMemoryAllocatorBase.cc.
|
inline |
Définition à la ligne 53 du fichier AcceleratorMemoryAllocatorBase.h.
|
inline |
Définition à la ligne 93 du fichier AcceleratorMemoryAllocatorBase.h.
|
private |
Taille d'un bloc. L'allocation sera un multiple de cette taille.
Définition à la ligne 107 du fichier AcceleratorMemoryAllocatorBase.h.
|
private |
Indique si l'allocation en utilisant m_block_size.
Définition à la ligne 109 du fichier AcceleratorMemoryAllocatorBase.h.
|
private |
Nombre d'allocations.
Définition à la ligne 111 du fichier AcceleratorMemoryAllocatorBase.h.
|
private |
Nombre d'allocations non alignées.
Définition à la ligne 113 du fichier AcceleratorMemoryAllocatorBase.h.