Class ImmutablePlatform.Builder
java.lang.Object
net.bmahe.genetics4j.gpu.opencl.model.ImmutablePlatform.Builder
- Enclosing class:
ImmutablePlatform
Builds instances of type
ImmutablePlatform
.
Initialize attributes and then invoke the build()
method to create an
immutable instance.
Builder
is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final long
private static final long
private static final long
private static final long
private static final long
private static final long
private long
private String
private int
private org.jocl.cl_platform_id
private PlatformProfile
private String
private String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAllExtensions
(Iterable<String> elements) Adds elements toextensions
set.addExtensions
(String element) Adds one element toextensions
set.addExtensions
(String... elements) Adds elements toextensions
set.build()
Builds a newImmutablePlatform
.extensions
(Iterable<String> elements) Sets or replaces all elements forextensions
set.private String
Fill a builder with attribute values from the providedPlatform
instance.Initializes the value for thename
attribute.numDevices
(int numDevices) Initializes the value for thenumDevices
attribute.platformId
(org.jocl.cl_platform_id platformId) Initializes the value for theplatformId
attribute.profile
(PlatformProfile profile) Initializes the value for theprofile
attribute.Initializes the value for thevendor
attribute.Initializes the value for theversion
attribute.
-
Field Details
-
INIT_BIT_PLATFORM_ID
private static final long INIT_BIT_PLATFORM_ID- See Also:
-
INIT_BIT_PROFILE
private static final long INIT_BIT_PROFILE- See Also:
-
INIT_BIT_VERSION
private static final long INIT_BIT_VERSION- 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_NUM_DEVICES
private static final long INIT_BIT_NUM_DEVICES- See Also:
-
initBits
private long initBits -
platformId
private org.jocl.cl_platform_id platformId -
profile
-
version
-
name
-
vendor
-
extensions
-
numDevices
private int numDevices
-
-
Constructor Details
-
Builder
private Builder()
-
-
Method Details
-
from
Fill a builder with attribute values from the providedPlatform
instance. 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:
this
builder for use in a chained invocation
-
platformId
Initializes the value for theplatformId
attribute.- Parameters:
platformId
- The value for platformId- Returns:
this
builder for use in a chained invocation
-
profile
Initializes the value for theprofile
attribute.- Parameters:
profile
- The value for profile- Returns:
this
builder for use in a chained invocation
-
version
Initializes the value for theversion
attribute.- Parameters:
version
- The value for version- Returns:
this
builder for use in a chained invocation
-
name
Initializes the value for thename
attribute.- Parameters:
name
- The value for name- Returns:
this
builder for use in a chained invocation
-
vendor
Initializes the value for thevendor
attribute.- Parameters:
vendor
- The value for vendor- Returns:
this
builder for use in a chained invocation
-
addExtensions
Adds one element toextensions
set.- Parameters:
element
- A extensions element- Returns:
this
builder for use in a chained invocation
-
addExtensions
Adds elements toextensions
set.- Parameters:
elements
- An array of extensions elements- Returns:
this
builder for use in a chained invocation
-
extensions
Sets or replaces all elements forextensions
set.- Parameters:
elements
- An iterable of extensions elements- Returns:
this
builder for use in a chained invocation
-
addAllExtensions
Adds elements toextensions
set.- Parameters:
elements
- An iterable of extensions elements- Returns:
this
builder for use in a chained invocation
-
numDevices
Initializes the value for thenumDevices
attribute.- Parameters:
numDevices
- The value for numDevices- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutablePlatform
.- Returns:
- An immutable instance of Platform
- Throws:
IllegalStateException
- if any required attributes are missing
-
formatRequiredAttributesMessage
-