JOCL v2.6.0-rc-20250722
JOCL, OpenCL® API Binding for Java™ (public API).
com.jogamp.opencl.util.CLBuildConfiguration Interface Reference

Configuration representing everything needed to build an OpenCL program. More...

Inheritance diagram for com.jogamp.opencl.util.CLBuildConfiguration:
Collaboration diagram for com.jogamp.opencl.util.CLBuildConfiguration:

Public Member Functions

CLProgram build (CLProgram program)
 Builds or rebuilds the program. More...
 
CLProgram build (CLProgram program, CLBuildListener listener)
 Builds or rebuilds the program. More...
 
CLProgramConfiguration setProgram (CLProgram program)
 Sets the program which should be build. More...
 
CLBuildConfiguration forDevice (CLDevice device)
 Adds the device as build target. More...
 
CLBuildConfiguration forDevices (CLDevice... devices)
 Adds the devices as build target. More...
 
CLBuildConfiguration reset ()
 Resets this builder's configuration like options, devices and definitions. More...
 
CLBuildConfiguration resetOptions ()
 Resets this builder's configuration options. More...
 
CLBuildConfiguration resetDefines ()
 Resets this builder's macro definitions. More...
 
CLBuildConfiguration resetDevices ()
 Resets this builder's device list. More...
 
CLBuildConfiguration withDefine (String name)
 Adds the definition to the build configuration. More...
 
CLBuildConfiguration withDefine (String name, Object value)
 Adds the definition to the build configuration. More...
 
CLBuildConfiguration withDefines (String... names)
 Adds the definitions to the build configuration. More...
 
CLBuildConfiguration withDefines (Map< String, ? extends Object > defines)
 Adds the definitions to the build configuration. More...
 
CLBuildConfiguration withOption (String option)
 Adds the compiler option to the build configuration. More...
 
CLBuildConfiguration withOptions (String... options)
 Adds the compiler options to the build configuration. More...
 
CLBuildConfiguration clone ()
 Clones this configuration. More...
 
void save (ObjectOutputStream oos) throws IOException
 Saves this configuration to the ObjectOutputStream. More...
 

Detailed Description

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)

Definition at line 51 of file CLBuildConfiguration.java.

Member Function Documentation

◆ build() [1/2]

CLProgram com.jogamp.opencl.util.CLBuildConfiguration.build ( CLProgram  program)

Builds or rebuilds the program.

Parameters
programThe program which should be build.

Implemented in com.jogamp.opencl.CLProgramBuilder.

◆ build() [2/2]

CLProgram com.jogamp.opencl.util.CLBuildConfiguration.build ( CLProgram  program,
CLBuildListener  listener 
)

Builds or rebuilds the program.

Parameters
programThe program which should be build.
listenerThe callback who is notified when the program has built.

Implemented in com.jogamp.opencl.CLProgramBuilder.

◆ clone()

CLBuildConfiguration com.jogamp.opencl.util.CLBuildConfiguration.clone ( )

◆ forDevice()

CLBuildConfiguration com.jogamp.opencl.util.CLBuildConfiguration.forDevice ( CLDevice  device)

Adds the device as build target.

Implemented in com.jogamp.opencl.util.CLProgramConfiguration, and com.jogamp.opencl.CLProgramBuilder.

◆ forDevices()

CLBuildConfiguration com.jogamp.opencl.util.CLBuildConfiguration.forDevices ( CLDevice...  devices)

Adds the devices as build target.

Implemented in com.jogamp.opencl.util.CLProgramConfiguration, and com.jogamp.opencl.CLProgramBuilder.

◆ reset()

CLBuildConfiguration com.jogamp.opencl.util.CLBuildConfiguration.reset ( )

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

Implemented in com.jogamp.opencl.CLProgramBuilder, and com.jogamp.opencl.util.CLProgramConfiguration.

◆ resetDefines()

CLBuildConfiguration com.jogamp.opencl.util.CLBuildConfiguration.resetDefines ( )

Resets this builder's macro definitions.

Implemented in com.jogamp.opencl.CLProgramBuilder, and com.jogamp.opencl.util.CLProgramConfiguration.

◆ resetDevices()

CLBuildConfiguration com.jogamp.opencl.util.CLBuildConfiguration.resetDevices ( )

Resets this builder's device list.

Implemented in com.jogamp.opencl.CLProgramBuilder, and com.jogamp.opencl.util.CLProgramConfiguration.

◆ resetOptions()

CLBuildConfiguration com.jogamp.opencl.util.CLBuildConfiguration.resetOptions ( )

Resets this builder's configuration options.

Implemented in com.jogamp.opencl.CLProgramBuilder, and com.jogamp.opencl.util.CLProgramConfiguration.

◆ save()

void com.jogamp.opencl.util.CLBuildConfiguration.save ( ObjectOutputStream  oos) throws IOException

Saves this configuration to the ObjectOutputStream.

The caller is responsible for closing the stream.

Implemented in com.jogamp.opencl.CLProgramBuilder.

◆ setProgram()

CLProgramConfiguration com.jogamp.opencl.util.CLBuildConfiguration.setProgram ( CLProgram  program)

Sets the program which should be build.

Implemented in com.jogamp.opencl.CLProgramBuilder.

◆ withDefine() [1/2]

CLBuildConfiguration com.jogamp.opencl.util.CLBuildConfiguration.withDefine ( String  name)

Adds the definition to the build configuration.

See also
CLProgram::define(java.lang.String)

Implemented in com.jogamp.opencl.CLProgramBuilder, and com.jogamp.opencl.util.CLProgramConfiguration.

◆ withDefine() [2/2]

CLBuildConfiguration com.jogamp.opencl.util.CLBuildConfiguration.withDefine ( String  name,
Object  value 
)

Adds the definition to the build configuration.

See also
CLProgram::define(java.lang.String, java.lang.Object)

Implemented in com.jogamp.opencl.CLProgramBuilder, and com.jogamp.opencl.util.CLProgramConfiguration.

◆ withDefines() [1/2]

CLBuildConfiguration com.jogamp.opencl.util.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)

Implemented in com.jogamp.opencl.util.CLProgramConfiguration.

◆ withDefines() [2/2]

CLBuildConfiguration com.jogamp.opencl.util.CLBuildConfiguration.withDefines ( String...  names)

Adds the definitions to the build configuration.

See also
com.jogamp.opencl.CLProgram::define(java.lang.String)

Implemented in com.jogamp.opencl.CLProgramBuilder, and com.jogamp.opencl.util.CLProgramConfiguration.

◆ withOption()

CLBuildConfiguration com.jogamp.opencl.util.CLBuildConfiguration.withOption ( String  option)

Adds the compiler option to the build configuration.

See also
com.jogamp.opencl.CLProgram.CompilerOptions

Implemented in com.jogamp.opencl.CLProgramBuilder, and com.jogamp.opencl.util.CLProgramConfiguration.

◆ withOptions()

CLBuildConfiguration com.jogamp.opencl.util.CLBuildConfiguration.withOptions ( String...  options)

Adds the compiler options to the build configuration.

See also
com.jogamp.opencl.CLProgram.CompilerOptions

Implemented in com.jogamp.opencl.CLProgramBuilder, and com.jogamp.opencl.util.CLProgramConfiguration.


The documentation for this interface was generated from the following file: