Package com.jogamp.opencl
Class CLSubBuffer<B extends Buffer>
- java.lang.Object
-
- com.jogamp.opencl.CLObject
-
- com.jogamp.opencl.CLMemory<B>
-
- com.jogamp.opencl.CLBuffer<B>
-
- com.jogamp.opencl.CLSubBuffer<B>
-
- All Implemented Interfaces:
AutoCloseable,CLResource
public class CLSubBuffer<B extends Buffer> extends CLBuffer<B>
A sub buffer of a CLBuffer.- Author:
- Michael Bien
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.jogamp.opencl.CLMemory
CLMemory.GLObjectType, CLMemory.Map, CLMemory.Mem
-
-
Field Summary
-
Fields inherited from class com.jogamp.opencl.CLMemory
clCapacity, elementSize, FLAGS, size
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclose()Deprecated.This method is not intended to be called from client code.CLSubBuffer<B>createSubBuffer(int origin, int size, CLMemory.Mem... flags)Throws an UnsupportedOperationException since creating sub buffers from sub buffers is not allowed as of OpenCL 1.1.intgetCLOffset()Returns the offset of this sub buffer to its parent in bytes.intgetOffset()Returns the offset of this sub buffer to its parent in buffer elements.CLBuffer<B>getParent()Returns the parent buffer this buffer was created from.booleanisReleased()Returns true ifCLResource.release()has been called.booleanisSubBuffer()Returns true.voidrelease()Releases the OpenCL resource.-
Methods inherited from class com.jogamp.opencl.CLBuffer
cloneWith, getSubBuffers
-
Methods inherited from class com.jogamp.opencl.CLMemory
equals, getBuffer, getCL, getCLCapacity, getCLSize, getConfig, getElementSize, getMapCount, getNIOCapacity, getNIOSize, getSizeImpl, hashCode, initCLCapacity, isHostPointerFlag, isReadOnly, isReadWrite, isWriteOnly, registerDestructorCallback, toString, use
-
Methods inherited from class com.jogamp.opencl.CLObject
getContext, getID, getPlatform
-
-
-
-
Method Detail
-
createSubBuffer
public CLSubBuffer<B> createSubBuffer(int origin, int size, CLMemory.Mem... flags)
Throws an UnsupportedOperationException since creating sub buffers from sub buffers is not allowed as of OpenCL 1.1.- Overrides:
createSubBufferin classCLBuffer<B extends Buffer>- Parameters:
origin- The offset in buffer elements.size- The size in buffer elements.
-
release
public void release()
Description copied from interface:CLResourceReleases the OpenCL resource.
-
getOffset
public int getOffset()
Returns the offset of this sub buffer to its parent in buffer elements.
-
getCLOffset
public int getCLOffset()
Returns the offset of this sub buffer to its parent in bytes.
-
isSubBuffer
public boolean isSubBuffer()
Returns true.- Overrides:
isSubBufferin classCLBuffer<B extends Buffer>
-
close
@Deprecated public final void close()
Deprecated.This method is not intended to be called from client code.Implementation detail, satisfyingAutoCloseable. Might be remove as soon we have extension methods, but shall validate with Java 1.5 specs.- Specified by:
closein interfaceAutoCloseable- See Also:
AutoCloseable
-
isReleased
public boolean isReleased()
Description copied from interface:CLResourceReturns true ifCLResource.release()has been called.- Specified by:
isReleasedin interfaceCLResource
-
-