CuFileBuffer#
- public final class CuFileBuffer extends BaseDeviceMemoryBuffer#
Represents a cuFile buffer.
Method Summary
Allocate memory for use with cuFile on the GPU.
Close this buffer and free memory.
Slice off a part of the buffer.
Fields inherited from class
ai.rapids.cudf.MemoryBuffer:address,closed,id,length,refCountMethods inherited from class
ai.rapids.cudf.MemoryBuffer:addressOutOfBoundsCheck,copyFromMemoryBuffer,copyFromMemoryBufferAsync,getAddress,getEventHandler,getLength,getRefCount,incRefCount,noWarnLeakExpected,setEventHandler,toStringMethods inherited from class
ai.rapids.cudf.BaseDeviceMemoryBuffer:copyFromDeviceBufferAsync,copyFromHostBuffer,copyFromHostBufferAsync,sliceWithCopyMethods
- public MemoryBuffer slice(long offset, long len)#
Slice off a part of the buffer.
Note that this is a zero copy operation and all slices must be closed along with the original buffer before the memory is released. So use this with some caution.
Note that
DeviceMemoryBufferandHostMemoryBuffersupport slicing, and override this function.- Parameters:
offset – where to start the slice at.
len – how many bytes to slice
- Returns:
a slice of the original buffer that will need to be closed independently
- public void close()#
Close this buffer and free memory.
Static Methods
- public static CuFileBuffer allocate(
- long bytes,
- boolean registerBuffer
Allocate memory for use with cuFile on the GPU.
You must close it when done.
- Parameters:
bytes – size in bytes to allocate
registerBuffer – If true, register the cuFile buffer.
- Returns:
the buffer