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
,AutoCloseable
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 void
close()
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.int
getCLOffset()
Returns the offset of this sub buffer to its parent in bytes.int
getOffset()
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.boolean
isReleased()
Returns true ifCLResource.release()
has been called.boolean
isSubBuffer()
Returns true.void
release()
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:
createSubBuffer
in 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:CLResource
Releases 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:
isSubBuffer
in 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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceAutoCloseable
- See Also:
AutoCloseable
-
isReleased
public boolean isReleased()
Description copied from interface:CLResource
Returns true ifCLResource.release()
has been called.- Specified by:
isReleased
in interfaceCLResource
-
-