public interface CLBuildConfiguration extends Cloneable
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.
CLProgramBuilder.createConfiguration(),
CLProgramBuilder.loadConfiguration(java.io.ObjectInputStream)| Modifier and Type | Method and Description |
|---|---|
CLProgram |
build(CLProgram program)
Builds or rebuilds the program.
|
CLProgram |
build(CLProgram program,
CLBuildListener listener)
Builds or rebuilds the program.
|
CLBuildConfiguration |
clone()
Clones this configuration.
|
CLBuildConfiguration |
forDevice(CLDevice device)
Adds the device as build target.
|
CLBuildConfiguration |
forDevices(CLDevice... devices)
Adds the devices as build target.
|
CLBuildConfiguration |
reset()
Resets this builder's configuration like options, devices and definitions.
|
CLBuildConfiguration |
resetDefines()
Resets this builder's macro definitions.
|
CLBuildConfiguration |
resetDevices()
Resets this builder's device list.
|
CLBuildConfiguration |
resetOptions()
Resets this builder's configuration options.
|
void |
save(ObjectOutputStream oos)
Saves this configuration to the ObjectOutputStream.
|
CLProgramConfiguration |
setProgram(CLProgram program)
Sets the program which should be build.
|
CLBuildConfiguration |
withDefine(String name)
Adds the definition to the build configuration.
|
CLBuildConfiguration |
withDefine(String name,
Object value)
Adds the definition to the build configuration.
|
CLBuildConfiguration |
withDefines(Map<String,? extends Object> defines)
Adds the definitions to the build configuration.
|
CLBuildConfiguration |
withDefines(String... names)
Adds the definitions to the build configuration.
|
CLBuildConfiguration |
withOption(String option)
Adds the compiler option to the build configuration.
|
CLBuildConfiguration |
withOptions(String... options)
Adds the compiler options to the build configuration.
|
CLProgram build(CLProgram program)
program - The program which should be build.CLProgram build(CLProgram program, CLBuildListener listener)
program - The program which should be build.listener - The callback who is notified when the program has built.CLProgramConfiguration setProgram(CLProgram program)
CLBuildConfiguration forDevice(CLDevice device)
CLBuildConfiguration forDevices(CLDevice... devices)
CLBuildConfiguration reset()
CLBuildConfiguration resetOptions()
CLBuildConfiguration resetDefines()
CLBuildConfiguration resetDevices()
CLBuildConfiguration withDefine(String name)
CLProgram.define(java.lang.String)CLBuildConfiguration withDefine(String name, Object value)
CLBuildConfiguration withDefines(String... names)
CLProgram.define(java.lang.String)CLBuildConfiguration withDefines(Map<String,? extends Object> defines)
CLBuildConfiguration withOption(String option)
CLProgram.CompilerOptionsCLBuildConfiguration withOptions(String... options)
CLProgram.CompilerOptionsCLBuildConfiguration clone()
void save(ObjectOutputStream oos) throws IOException
IOException