Top Description Methods
com.jogamp.opencl.util

public Interface CLBuildConfiguration

extends Cloneable
Known Direct Subinterfaces
com.jogamp.opencl.util.CLProgramConfiguration
Imports
com.jogamp.opencl.CLDevice, .CLProgram, java.io.IOException, .ObjectOutputStream, java.util.Map

Configuration representing everything needed to build an OpenCL program.

If you use save(java.io.ObjectOutputStream) to persist build configurations between JVM sessions it is highly recommended to call forDevice(com.jogamp.opencl.CLDevice) or forDevices(com.jogamp.opencl.CLDevice[]) before building the program. Driver updates or HW changes can make exact device-to-binary mapping hard, the builder will drop all unmappable binaries silently. Setting the devices explicitly will force automatic rebuilds from source in this situation.

Author
Michael Bien
See Also
com.jogamp.opencl.CLProgramBuilder#createConfiguration(), com.jogamp.opencl.CLProgramBuilder#loadConfiguration(java.io.ObjectInputStream)

Method Summary

Modifier and TypeMethod and Description
public CLProgram
build(CLProgram
The program which should be build.
program
)

Builds or rebuilds the program.

public CLProgram
build(CLProgram
The program which should be build.
program
,
CLBuildListener
The callback who is notified when the program has built.
listener
)

Builds or rebuilds the program.

public CLBuildConfiguration
clone()

Clones this configuration.

public CLBuildConfiguration
forDevice(CLDevice device)

Adds the device as build target.

public CLBuildConfiguration
forDevices(CLDevice... devices)

Adds the devices as build target.

public CLBuildConfiguration
reset()

Resets this builder's configuration like options, devices and definitions.

public CLBuildConfiguration
resetDefines()

Resets this builder's macro definitions.

public CLBuildConfiguration
resetDevices()

Resets this builder's device list.

public CLBuildConfiguration
resetOptions()

Resets this builder's configuration options.

public void
save(ObjectOutputStream oos)

Saves this configuration to the ObjectOutputStream.

public CLProgramConfiguration
setProgram(CLProgram program)

Sets the program which should be build.

public CLBuildConfiguration
withDefine(String name)

Adds the definition to the build configuration.

public CLBuildConfiguration
withDefine(String name, Object value)

Adds the definition to the build configuration.

public CLBuildConfiguration
withDefines(String... names)

Adds the definitions to the build configuration.

public CLBuildConfiguration
withDefines(Map<String, ? extends Object> defines)

Adds the definitions to the build configuration.

public CLBuildConfiguration
withOption(String option)

Adds the compiler option to the build configuration.

public CLBuildConfiguration
withOptions(String... options)

Adds the compiler options to the build configuration.

Method Detail

buildback to summary
public CLProgram build(CLProgram program)

Builds or rebuilds the program.

Parameters
program:CLProgram

The program which should be build.

buildback to summary
public CLProgram build(CLProgram program, CLBuildListener listener)

Builds or rebuilds the program.

Parameters
program:CLProgram

The program which should be build.

listener:CLBuildListener

The callback who is notified when the program has built.

cloneback to summary
public CLBuildConfiguration clone()

Clones this configuration.

forDeviceback to summary
public CLBuildConfiguration forDevice(CLDevice device)

Adds the device as build target.

forDevicesback to summary
public CLBuildConfiguration forDevices(CLDevice... devices)

Adds the devices as build target.

resetback to summary
public CLBuildConfiguration reset()

Resets this builder's configuration like options, devices and definitions.

resetDefinesback to summary
public CLBuildConfiguration resetDefines()

Resets this builder's macro definitions.

resetDevicesback to summary
public CLBuildConfiguration resetDevices()

Resets this builder's device list.

resetOptionsback to summary
public CLBuildConfiguration resetOptions()

Resets this builder's configuration options.

saveback to summary
public void save(ObjectOutputStream oos) throws IOException

Saves this configuration to the ObjectOutputStream. The caller is responsible for closing the stream.

setProgramback to summary
public CLProgramConfiguration setProgram(CLProgram program)

Sets the program which should be build.

withDefineback to summary
public CLBuildConfiguration withDefine(String name)

Adds the definition to the build configuration.

See Also
CLProgram#define(java.lang.String)
withDefineback to summary
public CLBuildConfiguration withDefine(String name, Object value)

Adds the definition to the build configuration.

See Also
CLProgram#define(java.lang.String, java.lang.Object)
withDefinesback to summary
public CLBuildConfiguration withDefines(String... names)

Adds the definitions to the build configuration.

See Also
com.jogamp.opencl.CLProgram#define(java.lang.String)
withDefinesback to summary
public CLBuildConfiguration withDefines(Map<String, ? extends Object> defines)

Adds the definitions to the build configuration.

See Also
com.jogamp.opencl.CLProgram#define(java.lang.String, java.lang.Object)
withOptionback to summary
public CLBuildConfiguration withOption(String option)

Adds the compiler option to the build configuration.

See Also
com.jogamp.opencl.CLProgram.CompilerOptions
withOptionsback to summary
public CLBuildConfiguration withOptions(String... options)

Adds the compiler options to the build configuration.

See Also
com.jogamp.opencl.CLProgram.CompilerOptions