Package foundry.veil.api.opencl
Record Class CLEnvironmentOptions
java.lang.Object
java.lang.Record
foundry.veil.api.opencl.CLEnvironmentOptions
- Record Components:
version
- The minimum required versiondeviceMask
- The mask for what types of devices should be usedrequireCompiler
- Whether the device needs to be able to compile program sourcesrequireOpenGL
- Whether the device needs to be able to support a mixed OpenGL/OpenCL environment
public record CLEnvironmentOptions(CLEnvironmentOptions.CLVersion version, int deviceMask, boolean requireCompiler, boolean requireOpenGL)
extends Record
Defines requirements for an OpenCL environment when requesting one from
VeilOpenCL
.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static enum
Supported versions of OpenCL. -
Field Summary
Modifier and TypeFieldDescriptionstatic final CLEnvironmentOptions
The default environment options. -
Constructor Summary
ConstructorDescriptionCLEnvironmentOptions
(CLEnvironmentOptions.CLVersion version, int deviceMask, boolean requireCompiler, boolean requireOpenGL) Creates an instance of aCLEnvironmentOptions
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic CLEnvironmentOptions.Builder
builder()
int
Returns the value of thedeviceMask
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of therequireCompiler
record component.boolean
Returns the value of therequireOpenGL
record component.boolean
testDevice
(VeilOpenCL.DeviceInfo deviceInfo) Tests if the specified device follows the required options specified.final String
toString()
Returns a string representation of this record class.version()
Returns the value of theversion
record component.
-
Field Details
-
DEFAULT
The default environment options.
-
-
Constructor Details
-
CLEnvironmentOptions
public CLEnvironmentOptions(CLEnvironmentOptions.CLVersion version, int deviceMask, boolean requireCompiler, boolean requireOpenGL) Creates an instance of aCLEnvironmentOptions
record class.- Parameters:
version
- the value for theversion
record componentdeviceMask
- the value for thedeviceMask
record componentrequireCompiler
- the value for therequireCompiler
record componentrequireOpenGL
- the value for therequireOpenGL
record component
-
-
Method Details
-
testDevice
Tests if the specified device follows the required options specified.- Parameters:
deviceInfo
- The device to test- Returns:
- Whether the device has all requirements
-
builder
- Returns:
- A new builder
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
version
Returns the value of theversion
record component.- Returns:
- the value of the
version
record component
-
deviceMask
public int deviceMask()Returns the value of thedeviceMask
record component.- Returns:
- the value of the
deviceMask
record component
-
requireCompiler
public boolean requireCompiler()Returns the value of therequireCompiler
record component.- Returns:
- the value of the
requireCompiler
record component
-
requireOpenGL
public boolean requireOpenGL()Returns the value of therequireOpenGL
record component.- Returns:
- the value of the
requireOpenGL
record component
-