Class ImmutableKernelInfo.Builder
java.lang.Object
net.bmahe.genetics4j.gpu.opencl.model.ImmutableKernelInfo.Builder
- Enclosing class:
ImmutableKernelInfo
Builds instances of type
ImmutableKernelInfo
.
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 static final long
private static final long
private static final long
private static final long
private static final long
private long
private long
private String
private long
private long
private long
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds a newImmutableKernelInfo
.private String
from
(KernelInfo instance) Fill a builder with attribute values from the providedKernelInfo
instance.localMemSize
(long localMemSize) Initializes the value for thelocalMemSize
attribute.Initializes the value for thename
attribute.preferredWorkGroupSizeMultiple
(long preferredWorkGroupSizeMultiple) Initializes the value for thepreferredWorkGroupSizeMultiple
attribute.privateMemSize
(long privateMemSize) Initializes the value for theprivateMemSize
attribute.workGroupSize
(long workGroupSize) Initializes the value for theworkGroupSize
attribute.
-
Field Details
-
INIT_BIT_NAME
private static final long INIT_BIT_NAME- See Also:
-
INIT_BIT_WORK_GROUP_SIZE
private static final long INIT_BIT_WORK_GROUP_SIZE- See Also:
-
INIT_BIT_PREFERRED_WORK_GROUP_SIZE_MULTIPLE
private static final long INIT_BIT_PREFERRED_WORK_GROUP_SIZE_MULTIPLE- See Also:
-
INIT_BIT_LOCAL_MEM_SIZE
private static final long INIT_BIT_LOCAL_MEM_SIZE- See Also:
-
INIT_BIT_PRIVATE_MEM_SIZE
private static final long INIT_BIT_PRIVATE_MEM_SIZE- See Also:
-
initBits
private long initBits -
name
-
workGroupSize
private long workGroupSize -
preferredWorkGroupSizeMultiple
private long preferredWorkGroupSizeMultiple -
localMemSize
private long localMemSize -
privateMemSize
private long privateMemSize
-
-
Constructor Details
-
Builder
private Builder()
-
-
Method Details
-
from
Fill a builder with attribute values from the providedKernelInfo
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
-
name
Initializes the value for thename
attribute.- Parameters:
name
- The value for name- Returns:
this
builder for use in a chained invocation
-
workGroupSize
Initializes the value for theworkGroupSize
attribute.- Parameters:
workGroupSize
- The value for workGroupSize- Returns:
this
builder for use in a chained invocation
-
preferredWorkGroupSizeMultiple
public final ImmutableKernelInfo.Builder preferredWorkGroupSizeMultiple(long preferredWorkGroupSizeMultiple) Initializes the value for thepreferredWorkGroupSizeMultiple
attribute.- Parameters:
preferredWorkGroupSizeMultiple
- The value for preferredWorkGroupSizeMultiple- Returns:
this
builder for use in a chained invocation
-
localMemSize
Initializes the value for thelocalMemSize
attribute.- Parameters:
localMemSize
- The value for localMemSize- Returns:
this
builder for use in a chained invocation
-
privateMemSize
Initializes the value for theprivateMemSize
attribute.- Parameters:
privateMemSize
- The value for privateMemSize- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableKernelInfo
.- Returns:
- An immutable instance of KernelInfo
- Throws:
IllegalStateException
- if any required attributes are missing
-
formatRequiredAttributesMessage
-