Package ai.rapids.cudf
Class RmmPoolMemoryResource<C extends RmmDeviceMemoryResource>
java.lang.Object
ai.rapids.cudf.RmmWrappingDeviceMemoryResource<C>
ai.rapids.cudf.RmmPoolMemoryResource<C>
- All Implemented Interfaces:
RmmDeviceMemoryResource
,AutoCloseable
public class RmmPoolMemoryResource<C extends RmmDeviceMemoryResource>
extends RmmWrappingDeviceMemoryResource<C>
A device memory resource that will pre-allocate a pool of resources and sub-allocate from this
pool to improve memory performance.
-
Field Summary
Fields inherited from class ai.rapids.cudf.RmmWrappingDeviceMemoryResource
wrapped
-
Constructor Summary
ConstructorsConstructorDescriptionRmmPoolMemoryResource
(C wrapped, long initSize, long maxSize) Create a new pooled memory resource taking ownership of the RmmDeviceMemoryResource that it is wrapping. -
Method Summary
Methods inherited from class ai.rapids.cudf.RmmWrappingDeviceMemoryResource
getWrapped, releaseWrapped
-
Constructor Details
-
RmmPoolMemoryResource
Create a new pooled memory resource taking ownership of the RmmDeviceMemoryResource that it is wrapping.- Parameters:
wrapped
- the memory resource to use for the pool. This should not be reused.initSize
- the size of the initial poolmaxSize
- the size of the maximum pool
-
-
Method Details
-
getMaxSize
public long getMaxSize() -
getHandle
public long getHandle()Description copied from interface:RmmDeviceMemoryResource
Returns a pointer to the underlying C++ class that implements rmm::mr::device_memory_resource -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceRmmDeviceMemoryResource
- Overrides:
close
in classRmmWrappingDeviceMemoryResource<C extends RmmDeviceMemoryResource>
-
toString
-