Top Description Inners Fields Constructors Methods
org.lwjgl.opencl

public final Class CLProgram

extends CLObjectChild<CLContext>
Class Inheritance
Imports
org.lwjgl.PointerBuffer, java.nio.ByteBuffer

This class is a wrapper around a cl_program pointer.
Author
Spasi

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static interface
CLProgram.CLProgramUtil

CLProgram utility methods interface.

Field Summary

Modifier and TypeField and Description
private final CLObjectRegistry<CLKernel>
private static final CLProgram.CLProgramUtil

Constructor Summary

AccessConstructor and Description
pack-priv
CLProgram(final long pointer, final CLContext context)

Method Summary

Modifier and TypeMethod and Description
public CLKernel[]

Returns:

a CLKernel array
createKernelsInProgram
()

Creates kernel objects for all kernels functions in this program.

public int

Returns:

the parameter value
getBuildInfoInt
(final CLDevice device, final int
the parameter
param_name
)

Returns the integer value of the specified parameter.

public String

Returns:

the parameter value
getBuildInfoString
(final CLDevice device, final int
the parameter
param_name
)

Returns the String value of the specified parameter.

public CLKernel

Returns:

the CLKernel object
getCLKernel
(final long
the kernel id
id
)

Returns a CLKernel associated with this program.

pack-priv CLObjectRegistry<CLKernel>
public ByteBuffer

Returns:

the array of devices
getInfoBinaries
(final ByteBuffer
the target ByteBuffer array.
target
)

Returns the program binaries for all devices associated with program, written sequentially in the target ByteBuffer.

public ByteBuffer[]

Returns:

the array of devices
getInfoBinaries
(final ByteBuffer[]
the target ByteBuffer array.
target
)

Returns the program binaries for all devices associated with program, as a ByteBuffer array.

public CLDevice[]

Returns:

the array of devices
getInfoDevices
()

Returns an array of CLDevices associated with this program.

public int

Returns:

the parameter value
getInfoInt
(final int
the parameter
param_name
)

Returns the integer value of the specified parameter.

public long[]

Returns:

the parameter values
getInfoSizeArray
(final int
the parameter
param_name
)

Returns an array of size_t values of the specified parameter.

public String

Returns:

the parameter value
getInfoString
(final int
the parameter
param_name
)

Returns the String value of the specified parameter.

pack-priv void
registerCLKernels(final PointerBuffer
a buffer containing CLKernel pointers.
kernels
)

Called from clCreateKernelsInProgram to register new CLKernels.

pack-priv int
Inherited from org.lwjgl.opencl.CLObjectChild:
getParent

Field Detail

clKernelsback to summary
private final CLObjectRegistry<CLKernel> clKernels
utilback to summary
private static final CLProgram.CLProgramUtil util

Constructor Detail

CLProgramback to summary
pack-priv CLProgram(final long pointer, final CLContext context)

Method Detail

createKernelsInProgramback to summary
public CLKernel[] createKernelsInProgram()

Creates kernel objects for all kernels functions in this program.

Returns:CLKernel[]

a CLKernel array

getBuildInfoIntback to summary
public int getBuildInfoInt(final CLDevice device, final int param_name)

Returns the integer value of the specified parameter.

Parameters
param_name:int

the parameter

Returns:int

the parameter value

getBuildInfoStringback to summary
public String getBuildInfoString(final CLDevice device, final int param_name)

Returns the String value of the specified parameter.

Parameters
param_name:int

the parameter

Returns:String

the parameter value

getCLKernelback to summary
public CLKernel getCLKernel(final long id)

Returns a CLKernel associated with this program.

Parameters
id:long

the kernel id

Returns:CLKernel

the CLKernel object

getCLKernelRegistryback to summary
pack-priv CLObjectRegistry<CLKernel> getCLKernelRegistry()
getInfoBinariesback to summary
public ByteBuffer getInfoBinaries(final 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:ByteBuffer

the target ByteBuffer array.

Returns:ByteBuffer

the array of devices

getInfoBinariesback to summary
public ByteBuffer[] getInfoBinaries(final 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:ByteBuffer[]

the target ByteBuffer array.

Returns:ByteBuffer[]

the array of devices

getInfoDevicesback to summary
public CLDevice[] getInfoDevices()

Returns an array of CLDevices associated with this program.

Returns:CLDevice[]

the array of devices

getInfoIntback to summary
public int getInfoInt(final int param_name)

Returns the integer value of the specified parameter.

Parameters
param_name:int

the parameter

Returns:int

the parameter value

getInfoSizeArrayback to summary
public long[] getInfoSizeArray(final int param_name)

Returns an array of size_t values of the specified parameter.

Parameters
param_name:int

the parameter

Returns:long[]

the parameter values

getInfoStringback to summary
public String getInfoString(final int param_name)

Returns the String value of the specified parameter.

Parameters
param_name:int

the parameter

Returns:String

the parameter value

registerCLKernelsback to summary
pack-priv void registerCLKernels(final PointerBuffer kernels)

Called from clCreateKernelsInProgram to register new CLKernels.

Parameters
kernels:PointerBuffer

a buffer containing CLKernel pointers.

releaseback to summary
pack-priv int release()

Overrides org.lwjgl.opencl.CLObjectRetainable.release.

org.lwjgl.opencl back to summary

pack-priv Interface CLProgram.CLProgramUtil

extends InfoUtil<CLProgram>
Known Direct Implementers
org.lwjgl.opencl.InfoUtilFactory.CLProgramUtil

CLProgram utility methods interface.

Method Summary

Modifier and TypeMethod and Description
public CLKernel[]
public int
getBuildInfoInt(CLProgram program, final CLDevice device, int param_name)

public String
getBuildInfoString(CLProgram program, final CLDevice device, int param_name)

public ByteBuffer
public ByteBuffer[]
public CLDevice[]
Inherited from org.lwjgl.opencl.InfoUtil:
getInfoIntgetInfoLonggetInfoSizegetInfoSizeArraygetInfoString

Method Detail

createKernelsInProgramback to summary
public CLKernel[] createKernelsInProgram(CLProgram program)
getBuildInfoIntback to summary
public int getBuildInfoInt(CLProgram program, final CLDevice device, int param_name)
getBuildInfoStringback to summary
public String getBuildInfoString(CLProgram program, final CLDevice device, int param_name)
getInfoBinariesback to summary
public ByteBuffer getInfoBinaries(CLProgram program, ByteBuffer target)
getInfoBinariesback to summary
public ByteBuffer[] getInfoBinaries(CLProgram program, ByteBuffer[] target)
getInfoDevicesback to summary
public CLDevice[] getInfoDevices(CLProgram program)