org.lwjgl.opencl
Class CLProgram

java.lang.Object
  extended by org.lwjgl.PointerWrapperAbstract
      extended by org.lwjgl.opencl.CLProgram
All Implemented Interfaces:
PointerWrapper

public final class CLProgram
extends PointerWrapperAbstract

This class is a wrapper around a cl_program pointer.

Author:
Spasi

Field Summary
 
Fields inherited from class org.lwjgl.PointerWrapperAbstract
pointer
 
Method Summary
 CLKernel[] createKernelsInProgram()
          Creates kernel objects for all kernels functions in this program.
 int getBuildInfoInt(CLDevice device, int param_name)
          Returns the integer value of the specified parameter.
 java.lang.String getBuildInfoString(CLDevice device, int param_name)
          Returns the String value of the specified parameter.
 CLKernel getCLKernel(long id)
          Returns a CLKernel associated with this program.
 java.nio.ByteBuffer getInfoBinaries(java.nio.ByteBuffer target)
          Returns the program binaries for all devices associated with program, written sequentially in the target ByteBuffer.
 java.nio.ByteBuffer[] getInfoBinaries(java.nio.ByteBuffer[] target)
          Returns the program binaries for all devices associated with program, as a ByteBuffer array.
 CLDevice[] getInfoDevices()
          Returns an array of CLDevices associated with this program.
 int getInfoInt(int param_name)
          Returns the integer value of the specified parameter.
 long[] getInfoSizeArray(int param_name)
          Returns an array of size_t values of the specified parameter.
 java.lang.String getInfoString(int param_name)
          Returns the String value of the specified parameter.
 P getParent()
           
 int getReferenceCount()
           
 boolean isValid()
          Returns true if this object represents a valid pointer.
 
Methods inherited from class org.lwjgl.PointerWrapperAbstract
checkValid, equals, getPointer, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getCLKernel

public CLKernel getCLKernel(long id)
Returns a CLKernel associated with this program.

Parameters:
id - the kernel id
Returns:
the CLKernel object

createKernelsInProgram

public CLKernel[] createKernelsInProgram()
Creates kernel objects for all kernels functions in this program.

Returns:
a CLKernel array

getInfoString

public java.lang.String getInfoString(int param_name)
Returns the String value of the specified parameter.

Parameters:
param_name - the parameter
Returns:
the parameter value

getInfoInt

public int getInfoInt(int param_name)
Returns the integer value of the specified parameter.

Parameters:
param_name - the parameter
Returns:
the parameter value

getInfoSizeArray

public long[] getInfoSizeArray(int param_name)
Returns an array of size_t values of the specified parameter.

Parameters:
param_name - the parameter
Returns:
the parameter values

getInfoDevices

public CLDevice[] getInfoDevices()
Returns an array of CLDevices associated with this program.

Returns:
the array of devices

getInfoBinaries

public java.nio.ByteBuffer getInfoBinaries(java.nio.ByteBuffer target)
Returns the program binaries for all devices associated with program, written sequentially in the target ByteBuffer. If the target parameter is null, a new ByteBuffer will be allocated. If not, the target ByteBuffer must be big enough to hold the program binaries, as returned by CL_PROGRAM_BINARY_SIZES.

Parameters:
target - the target ByteBuffer array.
Returns:
the array of devices

getInfoBinaries

public java.nio.ByteBuffer[] getInfoBinaries(java.nio.ByteBuffer[] target)
Returns the program binaries for all devices associated with program, as a ByteBuffer array. If the target parameter is null, a new ByteBuffer array will be allocated. If not, the target ByteBuffers must be big enough to hold the program binaries, as returned by CL_PROGRAM_BINARY_SIZES.

Parameters:
target - the target ByteBuffer array.
Returns:
the array of devices

getBuildInfoString

public java.lang.String getBuildInfoString(CLDevice device,
                                           int param_name)
Returns the String value of the specified parameter.

Parameters:
param_name - the parameter
Returns:
the parameter value

getBuildInfoInt

public int getBuildInfoInt(CLDevice device,
                           int param_name)
Returns the integer value of the specified parameter.

Parameters:
param_name - the parameter
Returns:
the parameter value

getParent

public P getParent()

getReferenceCount

public final int getReferenceCount()

isValid

public final boolean isValid()
Description copied from class: PointerWrapperAbstract
Returns true if this object represents a valid pointer. The pointer might be invalid because it is NULL or because some other action has deleted the object that this pointer represents.

Overrides:
isValid in class PointerWrapperAbstract
Returns:
true if the pointer is valid


Copyright © 2002-2009 lwjgl.org. All Rights Reserved.