public abstract class BaseDeviceMemoryBuffer extends MemoryBuffer
MemoryBuffer.EventHandler, MemoryBuffer.MemoryBufferCleaner
Modifier | Constructor and Description |
---|---|
protected |
BaseDeviceMemoryBuffer(long address,
long length,
MemoryBuffer.MemoryBufferCleaner cleaner) |
protected |
BaseDeviceMemoryBuffer(long address,
long length,
MemoryBuffer parent) |
Modifier and Type | Method and Description |
---|---|
void |
copyFromDeviceBufferAsync(long destOffset,
BaseDeviceMemoryBuffer src,
long srcOffset,
long length,
Cuda.Stream stream)
Copy a subset of src to this buffer starting at destOffset using the specified CUDA stream.
|
void |
copyFromHostBuffer(HostMemoryBuffer src)
Copy everything from src to this buffer starting at the beginning of this buffer.
|
void |
copyFromHostBuffer(HostMemoryBuffer src,
Cuda.Stream stream)
Copy entire host buffer starting at the beginning of this buffer using a CUDA stream.
|
void |
copyFromHostBuffer(HostMemoryBuffer src,
long srcOffset,
long length)
Copy a subset of src to this buffer starting at the beginning of this.
|
void |
copyFromHostBuffer(long destOffset,
HostMemoryBuffer src,
long srcOffset,
long length)
Copy a subset of src to this buffer starting at destOffset.
|
void |
copyFromHostBuffer(long destOffset,
HostMemoryBuffer src,
long srcOffset,
long length,
Cuda.Stream stream)
Copy a subset of src to this buffer starting at destOffset using the specified CUDA stream.
|
void |
copyFromHostBufferAsync(HostMemoryBuffer src,
Cuda.Stream stream)
Copy entire host buffer starting at the beginning of this buffer using a CUDA stream.
|
void |
copyFromHostBufferAsync(long destOffset,
HostMemoryBuffer src,
long srcOffset,
long length,
Cuda.Stream stream)
Copy a subset of src to this buffer starting at destOffset using the specified CUDA stream.
|
DeviceMemoryBuffer |
sliceWithCopy(long offset,
long len)
Slice off a part of the device buffer, copying it instead of reference counting it.
|
addressOutOfBoundsCheck, close, copyFromMemoryBuffer, copyFromMemoryBufferAsync, getAddress, getEventHandler, getLength, getRefCount, incRefCount, noWarnLeakExpected, setEventHandler, slice, toString
protected BaseDeviceMemoryBuffer(long address, long length, MemoryBuffer parent)
protected BaseDeviceMemoryBuffer(long address, long length, MemoryBuffer.MemoryBufferCleaner cleaner)
public final void copyFromHostBuffer(long destOffset, HostMemoryBuffer src, long srcOffset, long length)
destOffset
- the offset in this to start copying from.src
- what to copy fromsrcOffset
- offset into src to start outlength
- how many bytes to copypublic final void copyFromHostBuffer(long destOffset, HostMemoryBuffer src, long srcOffset, long length, Cuda.Stream stream)
destOffset
- the offset in this to start copying from.src
- what to copy fromsrcOffset
- offset into src to start outlength
- how many bytes to copystream
- CUDA stream to usepublic final void copyFromHostBufferAsync(long destOffset, HostMemoryBuffer src, long srcOffset, long length, Cuda.Stream stream)
destOffset
- the offset in this to start copying from.src
- what to copy fromsrcOffset
- offset into src to start outlength
- how many bytes to copystream
- CUDA stream to usepublic final void copyFromDeviceBufferAsync(long destOffset, BaseDeviceMemoryBuffer src, long srcOffset, long length, Cuda.Stream stream)
destOffset
- the offset in this to start copying from.src
- what to copy fromsrcOffset
- offset into src to start outlength
- how many bytes to copystream
- CUDA stream to usepublic final void copyFromHostBuffer(HostMemoryBuffer src, long srcOffset, long length)
src
- what to copy fromsrcOffset
- offset into src to start outlength
- how many bytes to copypublic final void copyFromHostBuffer(HostMemoryBuffer src)
src
- - Buffer to copy data frompublic final void copyFromHostBuffer(HostMemoryBuffer src, Cuda.Stream stream)
src
- host buffer to copy fromstream
- CUDA stream to usepublic final void copyFromHostBufferAsync(HostMemoryBuffer src, Cuda.Stream stream)
src
- host buffer to copy fromstream
- CUDA stream to usepublic final DeviceMemoryBuffer sliceWithCopy(long offset, long len)
offset
- where to start the slice at.len
- how many bytes to sliceCopyright © 2024. All rights reserved.