14#include "arcane/utils/MemoryUtils.h"
16#include "arcane/utils/PlatformUtils.h"
17#include "arcane/utils/MemoryAllocator.h"
18#include "arcane/utils/IMemoryRessourceMng.h"
19#include "arcane/utils/internal/IMemoryRessourceMngInternal.h"
30IMemoryAllocator* MemoryUtils::
31getDefaultDataAllocator()
39IMemoryAllocator* MemoryUtils::
40getDeviceOrHostAllocator()
52MemoryAllocationOptions MemoryUtils::
53getDefaultDataAllocator(eMemoryLocationHint hint)
55 return MemoryAllocationOptions(getDefaultDataAllocator(), hint);
61MemoryAllocationOptions MemoryUtils::
65 return MemoryAllocationOptions(allocator);
71MemoryAllocationOptions MemoryUtils::
72getAllocatorForMostlyReadOnlyData()
74 return getDefaultDataAllocator(eMemoryLocationHint::HostAndDeviceMostlyRead);
80Int64 MemoryUtils::impl::
81computeCapacity(
Int64 size)
83 double d_size =
static_cast<double>(size);
84 double d_new_capacity = d_size * 1.8;
86 d_new_capacity = d_size * 1.2;
87 else if (size > 500000)
88 d_new_capacity = d_size * 1.5;
89 return static_cast<Int64>(d_new_capacity);
100 mrm->_internal()->copy(source, destination_mem, destination, source_mem, queue);
virtual IMemoryAllocator * getAllocator(eMemoryRessource r)=0
Allocateur mémoire pour la ressource r.
Lecteur des fichiers de maillage via la bibliothèque LIMA.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
eMemoryRessource
Liste des ressources mémoire disponibles.
@ Device
Alloue sur le device.