public class CLBuffer<B extends Buffer> extends CLMemory<B>
CLMemory.GLObjectType, CLMemory.Map, CLMemory.Mem
clCapacity, elementSize, FLAGS, size
Modifier | Constructor and Description |
---|---|
protected |
CLBuffer(CLContext context,
B directBuffer,
long size,
long id,
int flags) |
protected |
CLBuffer(CLContext context,
long size,
long id,
int flags) |
Modifier and Type | Method and Description |
---|---|
<T extends Buffer> |
cloneWith(T directBuffer)
Returns a new instance of CLMemory pointing to the same CLResource but using a different Buffer.
|
void |
close()
Deprecated.
This method is not intended to be called from client code.
|
CLSubBuffer<B> |
createSubBuffer(int offset,
int size,
CLMemory.Mem... flags)
Creates a sub buffer with the specified region from this buffer.
|
List<CLSubBuffer<B>> |
getSubBuffers()
Returns the list of subbuffers.
|
boolean |
isReleased()
Returns true if
CLResource.release() has been called. |
boolean |
isSubBuffer()
Returns true if this is a sub buffer.
|
void |
release()
Releases the OpenCL resource.
|
equals, getBuffer, getCL, getCLCapacity, getCLSize, getConfig, getElementSize, getMapCount, getNIOCapacity, getNIOSize, getSizeImpl, hashCode, initCLCapacity, isHostPointerFlag, isReadOnly, isReadWrite, isWriteOnly, registerDestructorCallback, toString, use
getContext, getID, getPlatform
protected CLBuffer(CLContext context, long size, long id, int flags)
public CLSubBuffer<B> createSubBuffer(int offset, int size, CLMemory.Mem... flags)
offset
- The offset in buffer elements.size
- The size in buffer elements.public void release()
CLResource
public List<CLSubBuffer<B>> getSubBuffers()
public boolean isSubBuffer()
public <T extends Buffer> CLBuffer<T> cloneWith(T directBuffer)
CLMemory
@Deprecated public final void close()
AutoCloseable
.
Might be remove as soon we have extension methods, but shall validate with Java 1.5 specs.close
in interface AutoCloseable
AutoCloseable
public boolean isReleased()
CLResource
CLResource.release()
has been called.isReleased
in interface CLResource