Package com.jogamp.opencl.util
Interface CLBuildConfiguration
-
- All Superinterfaces:
Cloneable
- All Known Subinterfaces:
CLProgramConfiguration
- All Known Implementing Classes:
CLProgramBuilder
public interface CLBuildConfiguration extends Cloneable
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 callforDevice(com.jogamp.opencl.CLDevice)orforDevices(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:
CLProgramBuilder.createConfiguration(),CLProgramBuilder.loadConfiguration(java.io.ObjectInputStream)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CLProgrambuild(CLProgram program)Builds or rebuilds the program.CLProgrambuild(CLProgram program, CLBuildListener listener)Builds or rebuilds the program.CLBuildConfigurationclone()Clones this configuration.CLBuildConfigurationforDevice(CLDevice device)Adds the device as build target.CLBuildConfigurationforDevices(CLDevice... devices)Adds the devices as build target.CLBuildConfigurationreset()Resets this builder's configuration like options, devices and definitions.CLBuildConfigurationresetDefines()Resets this builder's macro definitions.CLBuildConfigurationresetDevices()Resets this builder's device list.CLBuildConfigurationresetOptions()Resets this builder's configuration options.voidsave(ObjectOutputStream oos)Saves this configuration to the ObjectOutputStream.CLProgramConfigurationsetProgram(CLProgram program)Sets the program which should be build.CLBuildConfigurationwithDefine(String name)Adds the definition to the build configuration.CLBuildConfigurationwithDefine(String name, Object value)Adds the definition to the build configuration.CLBuildConfigurationwithDefines(String... names)Adds the definitions to the build configuration.CLBuildConfigurationwithDefines(Map<String,? extends Object> defines)Adds the definitions to the build configuration.CLBuildConfigurationwithOption(String option)Adds the compiler option to the build configuration.CLBuildConfigurationwithOptions(String... options)Adds the compiler options to the build configuration.
-
-
-
Method Detail
-
build
CLProgram build(CLProgram program)
Builds or rebuilds the program.- Parameters:
program- The program which should be build.
-
build
CLProgram build(CLProgram program, CLBuildListener listener)
Builds or rebuilds the program.- Parameters:
program- The program which should be build.listener- The callback who is notified when the program has built.
-
setProgram
CLProgramConfiguration setProgram(CLProgram program)
Sets the program which should be build.
-
forDevice
CLBuildConfiguration forDevice(CLDevice device)
Adds the device as build target.
-
forDevices
CLBuildConfiguration forDevices(CLDevice... devices)
Adds the devices as build target.
-
reset
CLBuildConfiguration reset()
Resets this builder's configuration like options, devices and definitions.
-
resetOptions
CLBuildConfiguration resetOptions()
Resets this builder's configuration options.
-
resetDefines
CLBuildConfiguration resetDefines()
Resets this builder's macro definitions.
-
resetDevices
CLBuildConfiguration resetDevices()
Resets this builder's device list.
-
withDefine
CLBuildConfiguration withDefine(String name)
Adds the definition to the build configuration.- See Also:
CLProgram.define(java.lang.String)
-
withDefine
CLBuildConfiguration withDefine(String name, Object value)
Adds the definition to the build configuration.
-
withDefines
CLBuildConfiguration withDefines(String... names)
Adds the definitions to the build configuration.- See Also:
CLProgram.define(java.lang.String)
-
withDefines
CLBuildConfiguration withDefines(Map<String,? extends Object> defines)
Adds the definitions to the build configuration.
-
withOption
CLBuildConfiguration withOption(String option)
Adds the compiler option to the build configuration.- See Also:
CLProgram.CompilerOptions
-
withOptions
CLBuildConfiguration withOptions(String... options)
Adds the compiler options to the build configuration.- See Also:
CLProgram.CompilerOptions
-
clone
CLBuildConfiguration clone()
Clones this configuration.
-
save
void save(ObjectOutputStream oos) throws IOException
Saves this configuration to the ObjectOutputStream. The caller is responsible for closing the stream.- Throws:
IOException
-
-