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.
  • Constructor Details

    • RmmTrackingResourceAdaptor

      public RmmTrackingResourceAdaptor(C wrapped, long alignment)
      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 interface AutoCloseable
      Specified by:
      close in interface RmmDeviceMemoryResource
      Overrides:
      close in class RmmWrappingDeviceMemoryResource<C extends RmmDeviceMemoryResource>
    • toString

      public String toString()
      Overrides:
      toString in class Object