Package ai.rapids.cudf
Class RmmTrackingResourceAdaptor<C extends RmmDeviceMemoryResource>
java.lang.Object
ai.rapids.cudf.RmmWrappingDeviceMemoryResource<C>
ai.rapids.cudf.RmmTrackingResourceAdaptor<C>
- All Implemented Interfaces:
RmmDeviceMemoryResource
,AutoCloseable
public class RmmTrackingResourceAdaptor<C extends RmmDeviceMemoryResource>
extends RmmWrappingDeviceMemoryResource<C>
A device memory resource that will track some basic statistics about the memory usage.
-
Field Summary
Fields inherited from class ai.rapids.cudf.RmmWrappingDeviceMemoryResource
wrapped
-
Constructor Summary
ConstructorsConstructorDescriptionRmmTrackingResourceAdaptor
(C wrapped, long alignment) Create a new tracking resource adaptor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
long
Returns a pointer to the underlying C++ class that implements rmm::mr::device_memory_resourcelong
long
long
void
resetScopedMaxTotalBytesAllocated
(long initValue) toString()
Methods inherited from class ai.rapids.cudf.RmmWrappingDeviceMemoryResource
getWrapped, releaseWrapped
-
Constructor Details
-
RmmTrackingResourceAdaptor
Create a new tracking resource adaptor.- Parameters:
wrapped
- the memory resource to track allocations. This should not be reused.alignment
- the alignment to apply.
-
-
Method Details
-
getHandle
public long getHandle()Description copied from interface:RmmDeviceMemoryResource
Returns a pointer to the underlying C++ class that implements rmm::mr::device_memory_resource -
getTotalBytesAllocated
public long getTotalBytesAllocated() -
getMaxTotalBytesAllocated
public long getMaxTotalBytesAllocated() -
resetScopedMaxTotalBytesAllocated
public void resetScopedMaxTotalBytesAllocated(long initValue) -
getScopedMaxTotalBytesAllocated
public long getScopedMaxTotalBytesAllocated() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceRmmDeviceMemoryResource
- Overrides:
close
in classRmmWrappingDeviceMemoryResource<C extends RmmDeviceMemoryResource>
-
toString
-