Class ImmutableSingleKernelFitnessDescriptor
java.lang.Object
net.bmahe.genetics4j.gpu.spec.fitness.ImmutableSingleKernelFitnessDescriptor
- All Implemented Interfaces:
SingleKernelFitnessDescriptor
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableSingleKernelFitnessDescriptor
extends Object
implements SingleKernelFitnessDescriptor
Immutable implementation of
SingleKernelFitnessDescriptor
.
Use the builder to create immutable instances:
new SingleKernelFitnessDescriptor.Builder()
.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Builds instances of typeImmutableSingleKernelFitnessDescriptor
. -
Field Summary
Modifier and TypeFieldDescriptionprivate final Map
<Integer, DataLoader> private final KernelExecutionContextComputer
private final String
private final Map
<Integer, LocalMemoryAllocator> private final Map
<Integer, ResultAllocator> private final Map
<Integer, StaticDataLoader> -
Constructor Summary
ModifierConstructorDescriptionprivate
ImmutableSingleKernelFitnessDescriptor
(String kernelName, KernelExecutionContextComputer kernelExecutionContextComputer, Map<Integer, StaticDataLoader> staticDataLoaders, Map<Integer, DataLoader> dataLoaders, Map<Integer, LocalMemoryAllocator> localMemoryAllocators, Map<Integer, ResultAllocator> resultAllocators) -
Method Summary
Modifier and TypeMethodDescriptioncopyOf
(SingleKernelFitnessDescriptor instance) Creates an immutable copy of aSingleKernelFitnessDescriptor
value.private static <K,
V> Map <K, V> createUnmodifiableMap
(boolean checkNulls, boolean skipNulls, Map<? extends K, ? extends V> map) Association of kernel argument index and a data loaderboolean
This instance is equal to all instances ofImmutableSingleKernelFitnessDescriptor
that have equal attribute values.private boolean
equalTo
(int synthetic, ImmutableSingleKernelFitnessDescriptor another) int
hashCode()
Computes a hash code from attributes:kernelName
,kernelExecutionContextComputer
,staticDataLoaders
,dataLoaders
,localMemoryAllocators
,resultAllocators
.Computer for the kernel execution context (ex: globak work size)Name of the kernel to executeAssociation of kernel argument index and a local memory allocatorAssociation of kernel argument index and a result allocatorAssociation of kernel argument index and a static data loadertoString()
Prints the immutable valueSingleKernelFitnessDescriptor
with attribute values.withDataLoaders
(Map<Integer, ? extends DataLoader> entries) Copy the current immutable object by replacing thedataLoaders
map with the specified map.Copy the current immutable object by setting a value for thekernelExecutionContextComputer
attribute.withKernelName
(String value) Copy the current immutable object by setting a value for thekernelName
attribute.withLocalMemoryAllocators
(Map<Integer, ? extends LocalMemoryAllocator> entries) Copy the current immutable object by replacing thelocalMemoryAllocators
map with the specified map.withResultAllocators
(Map<Integer, ? extends ResultAllocator> entries) Copy the current immutable object by replacing theresultAllocators
map with the specified map.withStaticDataLoaders
(Map<Integer, ? extends StaticDataLoader> entries) Copy the current immutable object by replacing thestaticDataLoaders
map with the specified map.
-
Field Details
-
kernelName
-
kernelExecutionContextComputer
-
staticDataLoaders
-
dataLoaders
-
localMemoryAllocators
-
resultAllocators
-
-
Constructor Details
-
ImmutableSingleKernelFitnessDescriptor
private ImmutableSingleKernelFitnessDescriptor(String kernelName, KernelExecutionContextComputer kernelExecutionContextComputer, Map<Integer, StaticDataLoader> staticDataLoaders, Map<Integer, DataLoader> dataLoaders, Map<Integer, LocalMemoryAllocator> localMemoryAllocators, Map<Integer, ResultAllocator> resultAllocators)
-
-
Method Details
-
kernelName
Name of the kernel to execute- Specified by:
kernelName
in interfaceSingleKernelFitnessDescriptor
- Returns:
-
kernelExecutionContextComputer
Computer for the kernel execution context (ex: globak work size)- Specified by:
kernelExecutionContextComputer
in interfaceSingleKernelFitnessDescriptor
- Returns:
-
staticDataLoaders
Association of kernel argument index and a static data loader- Specified by:
staticDataLoaders
in interfaceSingleKernelFitnessDescriptor
- Returns:
-
dataLoaders
Association of kernel argument index and a data loader- Specified by:
dataLoaders
in interfaceSingleKernelFitnessDescriptor
- Returns:
-
localMemoryAllocators
Association of kernel argument index and a local memory allocator- Specified by:
localMemoryAllocators
in interfaceSingleKernelFitnessDescriptor
- Returns:
-
resultAllocators
Association of kernel argument index and a result allocator- Specified by:
resultAllocators
in interfaceSingleKernelFitnessDescriptor
- Returns:
-
withKernelName
Copy the current immutable object by setting a value for thekernelName
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for kernelName- Returns:
- A modified copy of the
this
object
-
withKernelExecutionContextComputer
public final ImmutableSingleKernelFitnessDescriptor withKernelExecutionContextComputer(KernelExecutionContextComputer value) Copy the current immutable object by setting a value for thekernelExecutionContextComputer
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for kernelExecutionContextComputer- Returns:
- A modified copy of the
this
object
-
withStaticDataLoaders
public final ImmutableSingleKernelFitnessDescriptor withStaticDataLoaders(Map<Integer, ? extends StaticDataLoader> entries) Copy the current immutable object by replacing thestaticDataLoaders
map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
entries
- The entries to be added to the staticDataLoaders map- Returns:
- A modified copy of
this
object
-
withDataLoaders
public final ImmutableSingleKernelFitnessDescriptor withDataLoaders(Map<Integer, ? extends DataLoader> entries) Copy the current immutable object by replacing thedataLoaders
map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
entries
- The entries to be added to the dataLoaders map- Returns:
- A modified copy of
this
object
-
withLocalMemoryAllocators
public final ImmutableSingleKernelFitnessDescriptor withLocalMemoryAllocators(Map<Integer, ? extends LocalMemoryAllocator> entries) Copy the current immutable object by replacing thelocalMemoryAllocators
map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
entries
- The entries to be added to the localMemoryAllocators map- Returns:
- A modified copy of
this
object
-
withResultAllocators
public final ImmutableSingleKernelFitnessDescriptor withResultAllocators(Map<Integer, ? extends ResultAllocator> entries) Copy the current immutable object by replacing theresultAllocators
map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
entries
- The entries to be added to the resultAllocators map- Returns:
- A modified copy of
this
object
-
equals
This instance is equal to all instances ofImmutableSingleKernelFitnessDescriptor
that have equal attribute values. -
equalTo
-
hashCode
public int hashCode()Computes a hash code from attributes:kernelName
,kernelExecutionContextComputer
,staticDataLoaders
,dataLoaders
,localMemoryAllocators
,resultAllocators
. -
toString
Prints the immutable valueSingleKernelFitnessDescriptor
with attribute values. -
copyOf
Creates an immutable copy of aSingleKernelFitnessDescriptor
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 SingleKernelFitnessDescriptor instance
-
createUnmodifiableMap
-