Class ImmutableKernelInfo
java.lang.Object
net.bmahe.genetics4j.gpu.opencl.model.ImmutableKernelInfo
- All Implemented Interfaces:
KernelInfo
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableKernelInfo
extends Object
implements KernelInfo
Immutable implementation of
KernelInfo
.
Use the builder to create immutable instances:
ImmutableKernelInfo.builder()
.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableKernelInfo
. -
Field Summary
Modifier and TypeFieldDescriptionprivate final long
private final String
private final long
private final long
private final long
-
Constructor Summary
ModifierConstructorDescriptionprivate
ImmutableKernelInfo
(String name, long workGroupSize, long preferredWorkGroupSizeMultiple, long localMemSize, long privateMemSize) -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableKernelInfo.Builder
builder()
Creates a builder forImmutableKernelInfo
.static ImmutableKernelInfo
copyOf
(KernelInfo instance) Creates an immutable copy of aKernelInfo
value.boolean
This instance is equal to all instances ofImmutableKernelInfo
that have equal attribute values.private boolean
equalTo
(int synthetic, ImmutableKernelInfo another) int
hashCode()
Computes a hash code from attributes:name
,workGroupSize
,preferredWorkGroupSizeMultiple
,localMemSize
,privateMemSize
.long
name()
long
long
toString()
Prints the immutable valueKernelInfo
with attribute values.final ImmutableKernelInfo
withLocalMemSize
(long value) Copy the current immutable object by setting a value for thelocalMemSize
attribute.final ImmutableKernelInfo
Copy the current immutable object by setting a value for thename
attribute.final ImmutableKernelInfo
withPreferredWorkGroupSizeMultiple
(long value) Copy the current immutable object by setting a value for thepreferredWorkGroupSizeMultiple
attribute.final ImmutableKernelInfo
withPrivateMemSize
(long value) Copy the current immutable object by setting a value for theprivateMemSize
attribute.final ImmutableKernelInfo
withWorkGroupSize
(long value) Copy the current immutable object by setting a value for theworkGroupSize
attribute.long
-
Field Details
-
name
-
workGroupSize
private final long workGroupSize -
preferredWorkGroupSizeMultiple
private final long preferredWorkGroupSizeMultiple -
localMemSize
private final long localMemSize -
privateMemSize
private final long privateMemSize
-
-
Constructor Details
-
ImmutableKernelInfo
private ImmutableKernelInfo(String name, long workGroupSize, long preferredWorkGroupSizeMultiple, long localMemSize, long privateMemSize)
-
-
Method Details
-
name
- Specified by:
name
in interfaceKernelInfo
- Returns:
- The value of the
name
attribute
-
workGroupSize
public long workGroupSize()- Specified by:
workGroupSize
in interfaceKernelInfo
- Returns:
- The value of the
workGroupSize
attribute
-
preferredWorkGroupSizeMultiple
public long preferredWorkGroupSizeMultiple()- Specified by:
preferredWorkGroupSizeMultiple
in interfaceKernelInfo
- Returns:
- The value of the
preferredWorkGroupSizeMultiple
attribute
-
localMemSize
public long localMemSize()- Specified by:
localMemSize
in interfaceKernelInfo
- Returns:
- The value of the
localMemSize
attribute
-
privateMemSize
public long privateMemSize()- Specified by:
privateMemSize
in interfaceKernelInfo
- Returns:
- The value of the
privateMemSize
attribute
-
withName
Copy the current immutable object by setting a value for thename
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for name- Returns:
- A modified copy of the
this
object
-
withWorkGroupSize
Copy the current immutable object by setting a value for theworkGroupSize
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for workGroupSize- Returns:
- A modified copy of the
this
object
-
withPreferredWorkGroupSizeMultiple
Copy the current immutable object by setting a value for thepreferredWorkGroupSizeMultiple
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for preferredWorkGroupSizeMultiple- Returns:
- A modified copy of the
this
object
-
withLocalMemSize
Copy the current immutable object by setting a value for thelocalMemSize
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for localMemSize- Returns:
- A modified copy of the
this
object
-
withPrivateMemSize
Copy the current immutable object by setting a value for theprivateMemSize
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for privateMemSize- Returns:
- A modified copy of the
this
object
-
equals
This instance is equal to all instances ofImmutableKernelInfo
that have equal attribute values. -
equalTo
-
hashCode
public int hashCode()Computes a hash code from attributes:name
,workGroupSize
,preferredWorkGroupSizeMultiple
,localMemSize
,privateMemSize
. -
toString
Prints the immutable valueKernelInfo
with attribute values. -
copyOf
Creates an immutable copy of aKernelInfo
value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance
- The instance to copy- Returns:
- A copied immutable KernelInfo instance
-
builder
Creates a builder forImmutableKernelInfo
.ImmutableKernelInfo.builder() .name(String) // required
name
.workGroupSize(long) // requiredworkGroupSize
.preferredWorkGroupSizeMultiple(long) // requiredpreferredWorkGroupSizeMultiple
.localMemSize(long) // requiredlocalMemSize
.privateMemSize(long) // requiredprivateMemSize
.build();- Returns:
- A new ImmutableKernelInfo builder
-