Class GPULazyCudaFreeMemoryManager
- java.lang.Object
- 
- org.apache.sysds.runtime.instructions.gpu.context.GPULazyCudaFreeMemoryManager
 
- 
 public class GPULazyCudaFreeMemoryManager extends Object 
- 
- 
Constructor SummaryConstructors Constructor Description GPULazyCudaFreeMemoryManager(GPUMemoryManager gpuManager)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(long size, jcuda.Pointer toFree)Add a pointer to the rmvar-ed listvoidclearAll()Set<jcuda.Pointer>getAllPointers()intgetNumPointers()Get total number of rmvared pointersjcuda.PointergetRmvarPointer(String opcode, long size)Get any pointer of the given size from rmvar-ed pointers (applicable if eager cudaFree is set to false)jcuda.PointergetRmvarPointerMinSize(String opcode, long minSize)longgetTotalMemoryAllocated()Return the total memory in bytes used by this memory managervoidremoveIfPresent(long size, jcuda.Pointer ptr)Remove a specific pointer if present in the internal hashmap
 
- 
- 
- 
Constructor Detail- 
GPULazyCudaFreeMemoryManagerpublic GPULazyCudaFreeMemoryManager(GPUMemoryManager gpuManager) 
 
- 
 - 
Method Detail- 
getRmvarPointerpublic 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)- Parameters:
- opcode- opcode
- size- size in bytes
- Returns:
- pointer
 
 - 
getAllPointerspublic Set<jcuda.Pointer> getAllPointers() 
 - 
clearAllpublic void clearAll() 
 - 
getRmvarPointerMinSizepublic jcuda.Pointer getRmvarPointerMinSize(String opcode, long minSize) throws DMLRuntimeException - Throws:
- DMLRuntimeException
 
 - 
getTotalMemoryAllocatedpublic long getTotalMemoryAllocated() Return the total memory in bytes used by this memory manager- Returns:
- number of bytes
 
 - 
getNumPointerspublic int getNumPointers() Get total number of rmvared pointers- Returns:
- number of pointers
 
 - 
addpublic void add(long size, jcuda.Pointer toFree)Add a pointer to the rmvar-ed list- Parameters:
- size- size of the pointer
- toFree- pointer
 
 - 
removeIfPresentpublic void removeIfPresent(long size, jcuda.Pointer ptr)Remove a specific pointer if present in the internal hashmap- Parameters:
- size- size in bytes
- ptr- pointer to be removed
 
 
- 
 
-