|
Grid 0.7.0
|
#include <MemoryManager.h>
Data Structures | |
| struct | AllocationCacheEntry |
| struct | AcceleratorViewEntry |
Static Public Member Functions | |
| static void | PrintBytes (void) |
| static void | Audit (std::string s) |
| static void | Init (void) |
| static void | InitMessage (void) |
| static void * | AcceleratorAllocate (size_t bytes) |
| static void | AcceleratorFree (void *ptr, size_t bytes) |
| static void * | SharedAllocate (size_t bytes) |
| static void | SharedFree (void *ptr, size_t bytes) |
| static void * | CpuAllocate (size_t bytes) |
| static void | CpuFree (void *ptr, size_t bytes) |
| static uint64_t | DeviceCacheBytes () |
| static uint64_t | HostCacheBytes () |
| static MemoryStatus | GetFootprint (void) |
| static void | DisplayMallinfo (void) |
| static void | NotifyDeletion (void *CpuPtr) |
| static void | Print (void) |
| static void | PrintAll (void) |
| static void | PrintState (void *CpuPtr) |
| static int | isOpen (void *CpuPtr) |
| static void | ViewClose (void *CpuPtr, ViewMode mode) |
| static void * | ViewOpen (void *CpuPtr, size_t bytes, ViewMode mode, ViewAdvise hint) |
Static Public Attributes | |
| static uint64_t | DeviceBytes |
| static uint64_t | DeviceLRUBytes |
| static uint64_t | DeviceMaxBytes |
| static uint64_t | HostToDeviceBytes |
| static uint64_t | DeviceToHostBytes |
| static uint64_t | HostToDeviceXfer |
| static uint64_t | DeviceToHostXfer |
| static uint64_t | DeviceEvictions |
| static uint64_t | DeviceDestroy |
Private Types | |
| typedef std::list< uint64_t > | LRU_t |
| typedef LRU_t::iterator | LRUiterator |
| typedef std::unordered_map< uint64_t, AcceleratorViewEntry > | AccViewTable_t |
| typedef AccViewTable_t::iterator | AccViewTableIterator |
Static Private Member Functions | |
| static void * | Insert (void *ptr, size_t bytes, int type) |
| static void * | Lookup (size_t bytes, int type) |
| static void * | Insert (void *ptr, size_t bytes, AllocationCacheEntry *entries, int ncache, int &victim, uint64_t &cbytes) |
| static void * | Lookup (size_t bytes, AllocationCacheEntry *entries, int ncache, uint64_t &cbytes) |
| static void | Create (uint64_t CpuPtr, size_t bytes, ViewMode mode, ViewAdvise hint) |
| static void | EvictVictims (uint64_t bytes) |
| static void | Evict (AcceleratorViewEntry &AccCache) |
| static void | Flush (AcceleratorViewEntry &AccCache) |
| static void | Clone (AcceleratorViewEntry &AccCache) |
| static void | AccDiscard (AcceleratorViewEntry &AccCache) |
| static void | CpuDiscard (AcceleratorViewEntry &AccCache) |
| static void | LRUinsert (AcceleratorViewEntry &AccCache) |
| static void | LRUremove (AcceleratorViewEntry &AccCache) |
| static int | EntryPresent (uint64_t CpuPtr) |
| static void | EntryCreate (uint64_t CpuPtr, size_t bytes, ViewMode mode, ViewAdvise hint) |
| static void | EntryErase (uint64_t CpuPtr) |
| static AccViewTableIterator | EntryLookup (uint64_t CpuPtr) |
| static void | EntrySet (uint64_t CpuPtr, AcceleratorViewEntry &entry) |
| static void | AcceleratorViewClose (uint64_t AccPtr) |
| static uint64_t | AcceleratorViewOpen (uint64_t CpuPtr, size_t bytes, ViewMode mode, ViewAdvise hint) |
| static void | CpuViewClose (uint64_t Ptr) |
| static uint64_t | CpuViewOpen (uint64_t CpuPtr, size_t bytes, ViewMode mode, ViewAdvise hint) |
Static Private Attributes | |
| static const int | NallocCacheMax |
| static const int | NallocType |
| static AllocationCacheEntry | Entries [NallocType][NallocCacheMax] |
| static int | Victim [NallocType] |
| static int | Ncache [NallocType] |
| static uint64_t | CacheBytes [NallocType] |
| static AccViewTable_t | AccViewTable |
| static LRU_t | LRU |
Definition at line 89 of file MemoryManager.h.
|
private |
Definition at line 165 of file MemoryManager.h.
|
private |
Definition at line 166 of file MemoryManager.h.
|
private |
Definition at line 179 of file MemoryManager.h.
|
private |
Definition at line 180 of file MemoryManager.h.
|
staticprivate |
Definition at line 278 of file MemoryManager.cc.
References CacheBytes, Entries, GRID_ALLOC_HUGE_LIMIT, GRID_ALLOC_SMALL_LIMIT, Insert(), Ncache, and Victim.
Referenced by AcceleratorFree(), CpuFree(), Insert(), and SharedFree().
|
staticprivate |
Definition at line 331 of file MemoryManager.cc.
References CacheBytes, Entries, GRID_ALLOC_HUGE_LIMIT, GRID_ALLOC_SMALL_LIMIT, Lookup(), and Ncache.
Referenced by AcceleratorAllocate(), CpuAllocate(), Lookup(), and SharedAllocate().
|
staticprivate |
Definition at line 292 of file MemoryManager.cc.
References MemoryManager::AllocationCacheEntry::address, MemoryManager::AllocationCacheEntry::bytes, and MemoryManager::AllocationCacheEntry::valid.
|
staticprivate |
Definition at line 345 of file MemoryManager.cc.
References MemoryManager::AllocationCacheEntry::address, MemoryManager::AllocationCacheEntry::bytes, and MemoryManager::AllocationCacheEntry::valid.
|
static |
Definition at line 57 of file MemoryManager.cc.
References Acc, CacheBytes, Cpu, DisplayMallinfo(), Shared, total_device, total_host, and total_shared.
Referenced by AcceleratorAllocate(), AcceleratorFree(), CpuAllocate(), CpuFree(), SharedAllocate(), and SharedFree().
|
static |
Definition at line 18 of file MemoryManagerShared.cc.
|
static |
Definition at line 201 of file MemoryManager.cc.
References Acc, AccHuge, AccSmall, Cpu, CpuHuge, CpuSmall, NallocCacheMax, Nc, Ncache, Shared, SharedHuge, and SharedSmall.
Referenced by Grid_init().
|
static |
Definition at line 239 of file MemoryManager.cc.
References Acc, AccHuge, AccSmall, Cpu, CpuHuge, CpuSmall, DeviceMaxBytes, GridLogMessage, Ncache, Shared, SharedHuge, and SharedSmall.
Referenced by Grid_init().
|
static |
Definition at line 92 of file MemoryManager.cc.
References Acc, acceleratorAllocDevice(), Lookup(), PrintBytes(), and total_device.
Referenced by devAllocator< _Tp1 >::allocate().
|
static |
Definition at line 105 of file MemoryManager.cc.
References Acc, acceleratorFreeDevice(), Insert(), PrintBytes(), and total_device.
Referenced by devAllocator< _Tp1 >::deallocate().
|
static |
Definition at line 117 of file MemoryManager.cc.
References acceleratorAllocShared(), Lookup(), PrintBytes(), Shared, and total_shared.
Referenced by uvmAllocator< _Tp1 >::allocate().
|
static |
Definition at line 130 of file MemoryManager.cc.
References acceleratorFreeShared(), Insert(), PrintBytes(), Shared, and total_shared.
Referenced by uvmAllocator< _Tp1 >::deallocate().
|
static |
Definition at line 143 of file MemoryManager.cc.
References acceleratorAllocShared(), Cpu, Lookup(), PrintBytes(), and total_host.
Referenced by alignedAllocator< _Tp1 >::allocate().
|
static |
Definition at line 156 of file MemoryManager.cc.
References acceleratorFreeShared(), Cpu, Insert(), NotifyDeletion(), PrintBytes(), and total_host.
Referenced by alignedAllocator< _Tp1 >::deallocate().
|
static |
Definition at line 79 of file MemoryManager.cc.
References Acc, AccHuge, AccSmall, and CacheBytes.
Referenced by GetFootprint().
|
static |
Definition at line 80 of file MemoryManager.cc.
References CacheBytes, Cpu, CpuHuge, and CpuSmall.
Referenced by GetFootprint().
|
inlinestatic |
Definition at line 144 of file MemoryManager.h.
References MemoryStatus::DeviceAllocCacheBytes, DeviceBytes, MemoryStatus::DeviceBytes, DeviceCacheBytes(), DeviceDestroy, MemoryStatus::DeviceDestroy, DeviceEvictions, MemoryStatus::DeviceEvictions, DeviceLRUBytes, MemoryStatus::DeviceLRUBytes, DeviceMaxBytes, MemoryStatus::DeviceMaxBytes, DeviceToHostBytes, MemoryStatus::DeviceToHostBytes, DeviceToHostXfer, MemoryStatus::DeviceToHostXfer, MemoryStatus::HostAllocCacheBytes, HostCacheBytes(), HostToDeviceBytes, MemoryStatus::HostToDeviceBytes, HostToDeviceXfer, and MemoryStatus::HostToDeviceXfer.
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
static |
|
static |
Definition at line 28 of file MemoryManagerShared.cc.
Referenced by CpuFree().
|
static |
Definition at line 26 of file MemoryManagerShared.cc.
|
static |
Definition at line 27 of file MemoryManagerShared.cc.
|
static |
Definition at line 22 of file MemoryManagerShared.cc.
References GridLogMessage.
Referenced by Lattice< CoarseSiteVector >::PrintCacheState().
|
static |
Definition at line 21 of file MemoryManagerShared.cc.
|
static |
Definition at line 19 of file MemoryManagerShared.cc.
Referenced by LatticeView< typename T::vector_object >::ViewClose().
|
static |
Definition at line 20 of file MemoryManagerShared.cc.
Referenced by LatticeView< typename T::vector_object >::ViewOpen().
|
staticprivate |
Definition at line 101 of file MemoryManager.h.
Referenced by Init().
|
staticprivate |
Definition at line 102 of file MemoryManager.h.
|
staticprivate |
Definition at line 103 of file MemoryManager.h.
|
staticprivate |
Definition at line 104 of file MemoryManager.h.
Referenced by Insert().
|
staticprivate |
Definition at line 87 of file MemoryManager.h.
Referenced by Init(), InitMessage(), Insert(), and Lookup().
|
staticprivate |
Definition at line 106 of file MemoryManager.h.
Referenced by DeviceCacheBytes(), HostCacheBytes(), Insert(), Lookup(), and PrintBytes().
|
static |
Definition at line 131 of file MemoryManager.h.
Referenced by GetFootprint(), and NAMESPACE_BEGIN().
|
static |
Definition at line 132 of file MemoryManager.h.
Referenced by GetFootprint(), and NAMESPACE_BEGIN().
|
static |
Definition at line 133 of file MemoryManager.h.
Referenced by GetFootprint(), Grid_init(), InitMessage(), and NAMESPACE_BEGIN().
|
static |
Definition at line 134 of file MemoryManager.h.
Referenced by GetFootprint(), and NAMESPACE_BEGIN().
|
static |
Definition at line 135 of file MemoryManager.h.
Referenced by GetFootprint(), and NAMESPACE_BEGIN().
|
static |
Definition at line 136 of file MemoryManager.h.
Referenced by GetFootprint(), and NAMESPACE_BEGIN().
|
static |
Definition at line 137 of file MemoryManager.h.
Referenced by GetFootprint(), and NAMESPACE_BEGIN().
|
static |
Definition at line 138 of file MemoryManager.h.
Referenced by GetFootprint(), and NAMESPACE_BEGIN().
|
static |
Definition at line 139 of file MemoryManager.h.
Referenced by GetFootprint(), and NAMESPACE_BEGIN().
|
staticprivate |
Definition at line 182 of file MemoryManager.h.
|
staticprivate |
Definition at line 183 of file MemoryManager.h.