Class ImmutableCLData.Builder
java.lang.Object
net.bmahe.genetics4j.gpu.spec.fitness.cldata.ImmutableCLData.Builder
- Enclosing class:
ImmutableCLData
Builds instances of type
ImmutableCLData
.
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
Modifier and TypeFieldDescriptionprivate org.jocl.cl_mem
private int
private static final long
private static final long
private static final long
private long
private int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds a newImmutableCLData
.final ImmutableCLData.Builder
clMem
(org.jocl.cl_mem clMem) Initializes the value for theclMem
attribute.final ImmutableCLData.Builder
clType
(int clType) Initializes the value for theclType
attribute.private String
final ImmutableCLData.Builder
Fill a builder with attribute values from the providedCLData
instance.final ImmutableCLData.Builder
size
(int size) Initializes the value for thesize
attribute.
-
Field Details
-
INIT_BIT_CL_MEM
private static final long INIT_BIT_CL_MEM- See Also:
-
INIT_BIT_CL_TYPE
private static final long INIT_BIT_CL_TYPE- See Also:
-
INIT_BIT_SIZE
private static final long INIT_BIT_SIZE- See Also:
-
initBits
private long initBits -
clMem
private org.jocl.cl_mem clMem -
clType
private int clType -
size
private int size
-
-
Constructor Details
-
Builder
private Builder()
-
-
Method Details
-
from
Fill a builder with attribute values from the providedCLData
instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
clMem
Initializes the value for theclMem
attribute.- Parameters:
clMem
- The value for clMem- Returns:
this
builder for use in a chained invocation
-
clType
Initializes the value for theclType
attribute.- Parameters:
clType
- The value for clType- Returns:
this
builder for use in a chained invocation
-
size
Initializes the value for thesize
attribute.- Parameters:
size
- The value for size- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableCLData
.- Returns:
- An immutable instance of CLData
- Throws:
IllegalStateException
- if any required attributes are missing
-
formatRequiredAttributesMessage
-