public class DeviceMemoryBuffer extends BaseDeviceMemoryBuffer
MemoryBuffer.EventHandler, MemoryBuffer.MemoryBufferCleaner
Modifier and Type | Method and Description |
---|---|
static DeviceMemoryBuffer |
allocate(long bytes)
Allocate memory for use on the GPU.
|
static DeviceMemoryBuffer |
allocate(long bytes,
Cuda.Stream stream)
Allocate memory for use on the GPU.
|
static DeviceMemoryBuffer |
fromRmm(long address,
long lengthInBytes,
long rmmBufferAddress)
Wrap an existing RMM allocation in a device memory buffer.
|
DeviceMemoryBuffer |
slice(long offset,
long len)
Slice off a part of the device buffer.
|
copyFromDeviceBufferAsync, copyFromHostBuffer, copyFromHostBuffer, copyFromHostBuffer, copyFromHostBuffer, copyFromHostBuffer, copyFromHostBufferAsync, copyFromHostBufferAsync, sliceWithCopy
addressOutOfBoundsCheck, close, copyFromMemoryBuffer, copyFromMemoryBufferAsync, getAddress, getEventHandler, getLength, getRefCount, incRefCount, noWarnLeakExpected, setEventHandler, toString
public static DeviceMemoryBuffer fromRmm(long address, long lengthInBytes, long rmmBufferAddress)
address
- device address of the RMM allocationlengthInBytes
- length of the RMM allocation in bytesrmmBufferAddress
- host address of the rmm::device_buffer that owns the device memorypublic static DeviceMemoryBuffer allocate(long bytes)
bytes
- size in bytes to allocatepublic static DeviceMemoryBuffer allocate(long bytes, Cuda.Stream stream)
bytes
- size in bytes to allocatestream
- The stream in which to synchronize this commandpublic final DeviceMemoryBuffer slice(long offset, long len)
slice
in class MemoryBuffer
offset
- where to start the slice at.len
- how many bytes to sliceCopyright © 2024. All rights reserved.