com.jogamp.opencl.impl
Class CLTLInfoAccessor

java.lang.Object
  extended by com.jogamp.opencl.impl.CLTLInfoAccessor
All Implemented Interfaces:
CLInfoAccessor
Direct Known Subclasses:
CLImage.CLImageInfoAccessor

public abstract class CLTLInfoAccessor
extends Object
implements CLInfoAccessor

Internal utility for common OpenCL clGetFooInfo calls. Threadsafe, threadlocal implementation.

Author:
Michael Bien

Field Summary
protected static ThreadLocal<ByteBuffer> localBB
           
protected static ThreadLocal<PointerBuffer> localNSB
           
 
Constructor Summary
CLTLInfoAccessor()
           
 
Method Summary
protected  ByteBuffer getBB(int minCapacity)
           
protected abstract  int getInfo(int name, long valueSize, Buffer value, PointerBuffer valueSizeRet)
           
 int[] getInts(int key, int n)
           
 long getLong(int key)
          Returns the long value for the given key.
protected  PointerBuffer getNSB()
           
 String getString(int key)
          Returns the String value for the given key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

localBB

protected static final ThreadLocal<ByteBuffer> localBB

localNSB

protected static final ThreadLocal<PointerBuffer> localNSB
Constructor Detail

CLTLInfoAccessor

public CLTLInfoAccessor()
Method Detail

getLong

public final long getLong(int key)
Description copied from interface: CLInfoAccessor
Returns the long value for the given key.

Specified by:
getLong in interface CLInfoAccessor

getString

public final String getString(int key)
Description copied from interface: CLInfoAccessor
Returns the String value for the given key.

Specified by:
getString in interface CLInfoAccessor

getInts

public final int[] getInts(int key,
                           int n)
Specified by:
getInts in interface CLInfoAccessor

getBB

protected ByteBuffer getBB(int minCapacity)

getNSB

protected PointerBuffer getNSB()

getInfo

protected abstract int getInfo(int name,
                               long valueSize,
                               Buffer value,
                               PointerBuffer valueSizeRet)