public class GPULazyCudaFreeMemoryManager extends Object
Modifier and Type | Field and Description |
---|---|
protected static org.apache.commons.logging.Log |
LOG |
Constructor and Description |
---|
GPULazyCudaFreeMemoryManager(GPUMemoryManager gpuManager) |
Modifier and Type | Method and Description |
---|---|
void |
add(long size,
jcuda.Pointer toFree)
Add a pointer to the rmvar-ed list
|
void |
clearAll() |
Set<jcuda.Pointer> |
getAllPointers() |
int |
getNumPointers()
Get total number of rmvared pointers
|
jcuda.Pointer |
getRmvarPointer(String opcode,
long size)
Get any pointer of the given size from rmvar-ed pointers (applicable if eager cudaFree is set to false)
|
jcuda.Pointer |
getRmvarPointerMinSize(String opcode,
long minSize) |
long |
getTotalMemoryAllocated()
Return the total memory in bytes used by this memory manager
|
void |
removeIfPresent(long size,
jcuda.Pointer ptr)
Remove a specific pointer if present in the internal hashmap
|
public GPULazyCudaFreeMemoryManager(GPUMemoryManager gpuManager)
public jcuda.Pointer getRmvarPointer(String opcode, long size)
opcode
- opcodesize
- size in bytespublic Set<jcuda.Pointer> getAllPointers()
public void clearAll()
public jcuda.Pointer getRmvarPointerMinSize(String opcode, long minSize) throws DMLRuntimeException
DMLRuntimeException
public long getTotalMemoryAllocated()
public int getNumPointers()
public void add(long size, jcuda.Pointer toFree)
size
- size of the pointertoFree
- pointerpublic void removeIfPresent(long size, jcuda.Pointer ptr)
size
- size in bytesptr
- pointer to be removedCopyright © 2018 The Apache Software Foundation. All rights reserved.