Top Description Fields Constructors Methods
com.jogamp.opencl

public Class CLSubBuffer<B extends Buffer>

extends CLBuffer<B extends Buffer>
Class Inheritance
Imports
com.jogamp.common.nio.Buffers, com.jogamp.opencl.CLMemory.Mem, java.nio.Buffer

A sub buffer of a CLBuffer.
Author
Michael Bien

Field Summary

Modifier and TypeField and Description
private final int
private final CLBuffer<B>

Constructor Summary

AccessConstructor and Description
pack-priv
CLSubBuffer(final CLBuffer<B> parent, final int origin, final int size, final B directBuffer, final long id, final int flags)

Method Summary

Modifier and TypeMethod and Description
public CLSubBuffer<B>
createSubBuffer(final int
The offset in buffer elements.
origin
,
final int
The size in buffer elements.
size
,
final CLMemory.Mem... flags)

Overrides com.jogamp.opencl.CLBuffer.createSubBuffer.

Throws an UnsupportedOperationException since creating sub buffers from sub buffers is not allowed as of OpenCL 1.1.
public int
getCLOffset()

Returns the offset of this sub buffer to its parent in bytes.

public int
getOffset()

Returns the offset of this sub buffer to its parent in buffer elements.

public CLBuffer<B>
getParent()

Returns the parent buffer this buffer was created from.

public boolean
public void
release()

Overrides com.jogamp.opencl.CLBuffer.release.

Implements com.jogamp.opencl.CLResource.release.

Releases the OpenCL resource.
Inherited from com.jogamp.opencl.CLBuffer:
cloneWithcreatecreategetSubBuffersonReleaseSubBuffer

Field Detail

offsetback to summary
private final int offset
parentback to summary
private final CLBuffer<B> parent

Constructor Detail

CLSubBufferback to summary
pack-priv CLSubBuffer(final CLBuffer<B> parent, final int origin, final int size, final B directBuffer, final long id, final int flags)

Method Detail

createSubBufferback to summary
public CLSubBuffer<B> createSubBuffer(final int origin, final int size, final CLMemory.Mem... flags)

Overrides com.jogamp.opencl.CLBuffer.createSubBuffer.

Throws an UnsupportedOperationException since creating sub buffers from sub buffers is not allowed as of OpenCL 1.1.

Parameters
origin:int

Doc from com.jogamp.opencl.CLBuffer.createSubBuffer.

The offset in buffer elements.

size:int

Doc from com.jogamp.opencl.CLBuffer.createSubBuffer.

The size in buffer elements.

Annotations
@Override
getCLOffsetback to summary
public int getCLOffset()

Returns the offset of this sub buffer to its parent in bytes.

getOffsetback to summary
public int getOffset()

Returns the offset of this sub buffer to its parent in buffer elements.

getParentback to summary
public CLBuffer<B> getParent()

Returns the parent buffer this buffer was created from.

isSubBufferback to summary
public boolean isSubBuffer()

Overrides com.jogamp.opencl.CLBuffer.isSubBuffer.

Returns true.

Annotations
@Override
releaseback to summary
public void release()

Overrides com.jogamp.opencl.CLBuffer.release.

Implements com.jogamp.opencl.CLResource.release.

Doc from com.jogamp.opencl.CLResource.release.

Releases the OpenCL resource.

Annotations
@Override