public class CudaFullCachingProvider extends CudaCachingZeroProvider
CudaCachingZeroProvider.CacheHolder, CudaCachingZeroProvider.CachePreallocator
Modifier and Type | Field and Description |
---|---|
protected ConcurrentHashMap<Integer,ConcurrentHashMap<AllocationShape,CudaCachingZeroProvider.CacheHolder>> |
deviceCache |
protected long |
MAX_GPU_ALLOCATION |
protected long |
MAX_GPU_CACHE |
cacheDeviceHit, cacheDeviceMiss, cacheZeroHit, cacheZeroMiss, configuration, deviceCachedAmount, FORCED_CACHE_THRESHOLD, MAX_CACHED_MEMORY, MAX_SINGLE_ALLOCATION, PREALLOCATION_LIMIT, singleLock, zeroCache, zeroCachedAmount
DEVICE_RESERVED_SPACE, nativeOps
Constructor and Description |
---|
CudaFullCachingProvider() |
Modifier and Type | Method and Description |
---|---|
protected void |
ensureDeviceCacheHolder(Integer deviceId,
AllocationShape shape) |
void |
free(AllocationPoint point)
This method frees specific chunk of memory, described by AllocationPoint passed in.
|
PointersPair |
malloc(AllocationShape shape,
AllocationPoint point,
AllocationStatus location)
This method provides PointersPair to memory chunk specified by AllocationShape
PLEASE NOTE: This method can actually ignore malloc request, and give out previously cached free memory chunk with equal shape.
|
ensureCacheHolder, printCacheStats
pingDeviceForFreeMemory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
pingDeviceForFreeMemory
protected final long MAX_GPU_ALLOCATION
protected final long MAX_GPU_CACHE
protected volatile ConcurrentHashMap<Integer,ConcurrentHashMap<AllocationShape,CudaCachingZeroProvider.CacheHolder>> deviceCache
public PointersPair malloc(AllocationShape shape, AllocationPoint point, AllocationStatus location)
CudaCachingZeroProvider
malloc
in interface MemoryProvider
malloc
in class CudaCachingZeroProvider
shape
- shape of desired memory chunkpoint
- target AllocationPoint structurelocation
- either HOST or DEVICEpublic void free(AllocationPoint point)
CudaCachingZeroProvider
free
in interface MemoryProvider
free
in class CudaCachingZeroProvider
protected void ensureDeviceCacheHolder(Integer deviceId, AllocationShape shape)
Copyright © 2016. All Rights Reserved.