Class ImmutableDevice.Builder
java.lang.Object
net.bmahe.genetics4j.gpu.opencl.model.ImmutableDevice.Builder
- Enclosing class:
ImmutableDevice
@Generated(from="Device",
generator="Immutables")
public static final class ImmutableDevice.Builder
extends Object
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.jocl.cl_device_idprivate EnumSet<DeviceType> private Stringprivate Stringprivate booleanprivate static final longprivate static final longprivate static final longprivate static final longprivate static final longprivate static final longprivate static final longprivate static final longprivate static final longprivate static final longprivate static final longprivate static final longprivate longprivate intprivate intprivate longprivate intprivate long[]private Stringprivate intprivate String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal ImmutableDevice.BuilderaddAllBuiltInKernels(Iterable<String> elements) Adds elements tobuiltInKernelsset.final ImmutableDevice.BuilderaddAllDeviceType(Iterable<DeviceType> elements) Adds elements todeviceTypeset.final ImmutableDevice.BuilderaddBuiltInKernels(String element) Adds one element tobuiltInKernelsset.final ImmutableDevice.BuilderaddBuiltInKernels(String... elements) Adds elements tobuiltInKernelsset.final ImmutableDevice.BuilderaddDeviceType(DeviceType element) Adds one element todeviceTypeset.final ImmutableDevice.BuilderaddDeviceType(DeviceType... elements) Adds elements todeviceTypeset.build()Builds a newDevice.final ImmutableDevice.BuilderbuiltInKernels(Iterable<String> elements) Sets or replaces all elements forbuiltInKernelsset.final ImmutableDevice.BuilderdeviceId(org.jocl.cl_device_id deviceId) Initializes the value for thedeviceIdattribute.final ImmutableDevice.BuilderdeviceType(Iterable<DeviceType> elements) Sets or replaces all elements fordeviceTypeset.final ImmutableDevice.BuilderdeviceVersion(String deviceVersion) Initializes the value for thedeviceVersionattribute.final ImmutableDevice.BuilderdriverVersion(String driverVersion) Initializes the value for thedriverVersionattribute.private Stringfinal ImmutableDevice.BuilderFill a builder with attribute values from the providedDeviceinstance.final ImmutableDevice.BuilderimageSupport(boolean imageSupport) Initializes the value for theimageSupportattribute.final ImmutableDevice.BuildermaxClockFrequency(int maxClockFrequency) Initializes the value for themaxClockFrequencyattribute.final ImmutableDevice.BuildermaxComputeUnits(int maxComputeUnits) Initializes the value for themaxComputeUnitsattribute.final ImmutableDevice.BuildermaxWorkGroupSize(long maxWorkGroupSize) Initializes the value for themaxWorkGroupSizeattribute.final ImmutableDevice.BuildermaxWorkItemDimensions(int maxWorkItemDimensions) Initializes the value for themaxWorkItemDimensionsattribute.final ImmutableDevice.BuildermaxWorkItemSizes(long... maxWorkItemSizes) Initializes the value for themaxWorkItemSizesattribute.final ImmutableDevice.BuilderInitializes the value for thenameattribute.final ImmutableDevice.BuilderpreferredVectorWidthFloat(int preferredVectorWidthFloat) Initializes the value for thepreferredVectorWidthFloatattribute.final ImmutableDevice.BuilderInitializes the value for thevendorattribute.
-
Field Details
-
INIT_BIT_DEVICE_ID
private static final long INIT_BIT_DEVICE_ID- See Also:
-
INIT_BIT_NAME
private static final long INIT_BIT_NAME- See Also:
-
INIT_BIT_VENDOR
private static final long INIT_BIT_VENDOR- See Also:
-
INIT_BIT_DEVICE_VERSION
private static final long INIT_BIT_DEVICE_VERSION- See Also:
-
INIT_BIT_DRIVER_VERSION
private static final long INIT_BIT_DRIVER_VERSION- See Also:
-
INIT_BIT_MAX_CLOCK_FREQUENCY
private static final long INIT_BIT_MAX_CLOCK_FREQUENCY- See Also:
-
INIT_BIT_MAX_COMPUTE_UNITS
private static final long INIT_BIT_MAX_COMPUTE_UNITS- See Also:
-
INIT_BIT_MAX_WORK_ITEM_DIMENSIONS
private static final long INIT_BIT_MAX_WORK_ITEM_DIMENSIONS- See Also:
-
INIT_BIT_MAX_WORK_GROUP_SIZE
private static final long INIT_BIT_MAX_WORK_GROUP_SIZE- See Also:
-
INIT_BIT_MAX_WORK_ITEM_SIZES
private static final long INIT_BIT_MAX_WORK_ITEM_SIZES- See Also:
-
INIT_BIT_IMAGE_SUPPORT
private static final long INIT_BIT_IMAGE_SUPPORT- See Also:
-
INIT_BIT_PREFERRED_VECTOR_WIDTH_FLOAT
private static final long INIT_BIT_PREFERRED_VECTOR_WIDTH_FLOAT- See Also:
-
initBits
private long initBits -
deviceId
private org.jocl.cl_device_id deviceId -
name
-
vendor
-
deviceVersion
-
driverVersion
-
maxClockFrequency
private int maxClockFrequency -
deviceType
-
builtInKernels
-
maxComputeUnits
private int maxComputeUnits -
maxWorkItemDimensions
private int maxWorkItemDimensions -
maxWorkGroupSize
private long maxWorkGroupSize -
maxWorkItemSizes
private long[] maxWorkItemSizes -
imageSupport
private boolean imageSupport -
preferredVectorWidthFloat
private int preferredVectorWidthFloat
-
-
Constructor Details
-
Builder
private Builder()
-
-
Method Details
-
from
Fill a builder with attribute values from the providedDeviceinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
deviceId
Initializes the value for thedeviceIdattribute.- Parameters:
deviceId- The value for deviceId- Returns:
thisbuilder for use in a chained invocation
-
name
Initializes the value for thenameattribute.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
vendor
Initializes the value for thevendorattribute.- Parameters:
vendor- The value for vendor- Returns:
thisbuilder for use in a chained invocation
-
deviceVersion
Initializes the value for thedeviceVersionattribute.- Parameters:
deviceVersion- The value for deviceVersion- Returns:
thisbuilder for use in a chained invocation
-
driverVersion
Initializes the value for thedriverVersionattribute.- Parameters:
driverVersion- The value for driverVersion- Returns:
thisbuilder for use in a chained invocation
-
maxClockFrequency
Initializes the value for themaxClockFrequencyattribute.- Parameters:
maxClockFrequency- The value for maxClockFrequency- Returns:
thisbuilder for use in a chained invocation
-
addDeviceType
Adds one element todeviceTypeset.- Parameters:
element- A deviceType element- Returns:
thisbuilder for use in a chained invocation
-
addDeviceType
Adds elements todeviceTypeset.- Parameters:
elements- An array of deviceType elements- Returns:
thisbuilder for use in a chained invocation
-
deviceType
Sets or replaces all elements fordeviceTypeset.- Parameters:
elements- An iterable of deviceType elements- Returns:
thisbuilder for use in a chained invocation
-
addAllDeviceType
Adds elements todeviceTypeset.- Parameters:
elements- An iterable of deviceType elements- Returns:
thisbuilder for use in a chained invocation
-
addBuiltInKernels
Adds one element tobuiltInKernelsset.- Parameters:
element- A builtInKernels element- Returns:
thisbuilder for use in a chained invocation
-
addBuiltInKernels
Adds elements tobuiltInKernelsset.- Parameters:
elements- An array of builtInKernels elements- Returns:
thisbuilder for use in a chained invocation
-
builtInKernels
Sets or replaces all elements forbuiltInKernelsset.- Parameters:
elements- An iterable of builtInKernels elements- Returns:
thisbuilder for use in a chained invocation
-
addAllBuiltInKernels
Adds elements tobuiltInKernelsset.- Parameters:
elements- An iterable of builtInKernels elements- Returns:
thisbuilder for use in a chained invocation
-
maxComputeUnits
Initializes the value for themaxComputeUnitsattribute.- Parameters:
maxComputeUnits- The value for maxComputeUnits- Returns:
thisbuilder for use in a chained invocation
-
maxWorkItemDimensions
Initializes the value for themaxWorkItemDimensionsattribute.- Parameters:
maxWorkItemDimensions- The value for maxWorkItemDimensions- Returns:
thisbuilder for use in a chained invocation
-
maxWorkGroupSize
Initializes the value for themaxWorkGroupSizeattribute.- Parameters:
maxWorkGroupSize- The value for maxWorkGroupSize- Returns:
thisbuilder for use in a chained invocation
-
maxWorkItemSizes
Initializes the value for themaxWorkItemSizesattribute.- Parameters:
maxWorkItemSizes- The elements for maxWorkItemSizes- Returns:
thisbuilder for use in a chained invocation
-
imageSupport
Initializes the value for theimageSupportattribute.- Parameters:
imageSupport- The value for imageSupport- Returns:
thisbuilder for use in a chained invocation
-
preferredVectorWidthFloat
Initializes the value for thepreferredVectorWidthFloatattribute.- Parameters:
preferredVectorWidthFloat- The value for preferredVectorWidthFloat- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newDevice.- Returns:
- An immutable instance of Device
- Throws:
IllegalStateException- if any required attributes are missing
-
formatRequiredAttributesMessage
-