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
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumSupported versions of OpenCL. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CLEnvironmentOptionsThe default environment options. -
Constructor Summary
ConstructorsConstructorDescriptionCLEnvironmentOptions(CLEnvironmentOptions.CLVersion version, int deviceMask, boolean requireCompiler, boolean requireOpenGL) Creates an instance of aCLEnvironmentOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic CLEnvironmentOptions.Builderbuilder()intReturns the value of thedeviceMaskrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of therequireCompilerrecord component.booleanReturns the value of therequireOpenGLrecord component.booleantestDevice(VeilOpenCL.DeviceInfo deviceInfo) Tests if the specified device follows the required options specified.final StringtoString()Returns a string representation of this record class.version()Returns the value of theversionrecord 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 aCLEnvironmentOptionsrecord class.- Parameters:
version- the value for theversionrecord componentdeviceMask- the value for thedeviceMaskrecord componentrequireCompiler- the value for therequireCompilerrecord componentrequireOpenGL- the value for therequireOpenGLrecord 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 theversionrecord component.- Returns:
- the value of the
versionrecord component
-
deviceMask
public int deviceMask()Returns the value of thedeviceMaskrecord component.- Returns:
- the value of the
deviceMaskrecord component
-
requireCompiler
public boolean requireCompiler()Returns the value of therequireCompilerrecord component.- Returns:
- the value of the
requireCompilerrecord component
-
requireOpenGL
public boolean requireOpenGL()Returns the value of therequireOpenGLrecord component.- Returns:
- the value of the
requireOpenGLrecord component
-