public class OpaqueDataBuffer
extends org.bytedeco.javacpp.Pointer
| Constructor and Description |
|---|
OpaqueDataBuffer(org.bytedeco.javacpp.Pointer p) |
| Modifier and Type | Method and Description |
|---|---|
static OpaqueDataBuffer |
allocateDataBuffer(long numElements,
@NonNull DataType dataType,
boolean allocateBoth)
This method allocates new InteropDataBuffer and returns pointer to it
|
void |
closeBuffer()
This method releases underlying buffer
|
OpaqueDataBuffer |
createView(long bytesLength,
long bytesOffset)
This method creates a view out of this InteropDataBuffer
|
int |
deviceId()
This method returns deviceId of this DataBuffer
|
void |
expand(long numElements)
This method expands buffer, and copies content to the new buffer
PLEASE NOTE: if InteropDataBuffer doesn't own actual buffers - original pointers won't be released
|
static OpaqueDataBuffer |
externalizedDataBuffer(long numElements,
@NonNull DataType dataType,
org.bytedeco.javacpp.Pointer primary,
org.bytedeco.javacpp.Pointer special) |
org.bytedeco.javacpp.Pointer |
primaryBuffer()
This method returns pointer to linear buffer, primary one.
|
void |
setPrimaryBuffer(org.bytedeco.javacpp.Pointer ptr,
long numElements)
This method allows to set external pointer as primary buffer.
|
void |
setSpecialBuffer(org.bytedeco.javacpp.Pointer ptr,
long numElements)
This method allows to set external pointer as primary buffer.
|
org.bytedeco.javacpp.Pointer |
specialBuffer()
This method returns pointer to special buffer, device one, if any.
|
void |
syncToPrimary()
This method synchronizes host memory
|
void |
syncToSpecial()
This method synchronizes device memory
|
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getPointer, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zeropublic static OpaqueDataBuffer externalizedDataBuffer(long numElements, @NonNull @NonNull DataType dataType, org.bytedeco.javacpp.Pointer primary, org.bytedeco.javacpp.Pointer special)
public static OpaqueDataBuffer allocateDataBuffer(long numElements, @NonNull @NonNull DataType dataType, boolean allocateBoth)
numElements - dataType - allocateBoth - public void expand(long numElements)
numElements - public OpaqueDataBuffer createView(long bytesLength, long bytesOffset)
bytesLength - bytesOffset - public org.bytedeco.javacpp.Pointer primaryBuffer()
public org.bytedeco.javacpp.Pointer specialBuffer()
public int deviceId()
public void setPrimaryBuffer(org.bytedeco.javacpp.Pointer ptr,
long numElements)
ptr - numElements - public void setSpecialBuffer(org.bytedeco.javacpp.Pointer ptr,
long numElements)
ptr - numElements - public void syncToSpecial()
public void syncToPrimary()
public void closeBuffer()
Copyright © 2022. All rights reserved.