Class ImmutableSingleKernelFitnessDescriptor
java.lang.Object
net.bmahe.genetics4j.gpu.spec.fitness.ImmutableSingleKernelFitnessDescriptor
- All Implemented Interfaces:
SingleKernelFitnessDescriptor
@Generated(from="SingleKernelFitnessDescriptor",
generator="Immutables")
@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
Nested ClassesModifier and TypeClassDescriptionstatic classBuilds instances of typeSingleKernelFitnessDescriptor. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<Integer, DataLoader> private final KernelExecutionContextComputerprivate final Stringprivate final Map<Integer, LocalMemoryAllocator> private final Map<Integer, ResultAllocator> private final Map<Integer, StaticDataLoader> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateImmutableSingleKernelFitnessDescriptor(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 aSingleKernelFitnessDescriptorvalue.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 loaderbooleanThis instance is equal to all instances ofImmutableSingleKernelFitnessDescriptorthat have equal attribute values.private booleaninthashCode()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 valueSingleKernelFitnessDescriptorwith attribute values.withDataLoaders(Map<Integer, ? extends DataLoader> entries) Copy the current immutable object by replacing thedataLoadersmap with the specified map.Copy the current immutable object by setting a value for thekernelExecutionContextComputerattribute.withKernelName(String value) Copy the current immutable object by setting a value for thekernelNameattribute.withLocalMemoryAllocators(Map<Integer, ? extends LocalMemoryAllocator> entries) Copy the current immutable object by replacing thelocalMemoryAllocatorsmap with the specified map.withResultAllocators(Map<Integer, ? extends ResultAllocator> entries) Copy the current immutable object by replacing theresultAllocatorsmap with the specified map.withStaticDataLoaders(Map<Integer, ? extends StaticDataLoader> entries) Copy the current immutable object by replacing thestaticDataLoadersmap 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:
kernelNamein interfaceSingleKernelFitnessDescriptor- Returns:
-
kernelExecutionContextComputer
Computer for the kernel execution context (ex: globak work size)- Specified by:
kernelExecutionContextComputerin interfaceSingleKernelFitnessDescriptor- Returns:
-
staticDataLoaders
Association of kernel argument index and a static data loader- Specified by:
staticDataLoadersin interfaceSingleKernelFitnessDescriptor- Returns:
-
dataLoaders
Association of kernel argument index and a data loader- Specified by:
dataLoadersin interfaceSingleKernelFitnessDescriptor- Returns:
-
localMemoryAllocators
Association of kernel argument index and a local memory allocator- Specified by:
localMemoryAllocatorsin interfaceSingleKernelFitnessDescriptor- Returns:
-
resultAllocators
Association of kernel argument index and a result allocator- Specified by:
resultAllocatorsin interfaceSingleKernelFitnessDescriptor- Returns:
-
withKernelName
Copy the current immutable object by setting a value for thekernelNameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for kernelName- Returns:
- A modified copy or the
thisobject
-
withKernelExecutionContextComputer
public final ImmutableSingleKernelFitnessDescriptor withKernelExecutionContextComputer(KernelExecutionContextComputer value) Copy the current immutable object by setting a value for thekernelExecutionContextComputerattribute. 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 or the
thisobject
-
withStaticDataLoaders
public final ImmutableSingleKernelFitnessDescriptor withStaticDataLoaders(Map<Integer, ? extends StaticDataLoader> entries) Copy the current immutable object by replacing thestaticDataLoadersmap 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 replace the staticDataLoaders map- Returns:
- A modified copy or
thisif not changed
-
withDataLoaders
public final ImmutableSingleKernelFitnessDescriptor withDataLoaders(Map<Integer, ? extends DataLoader> entries) Copy the current immutable object by replacing thedataLoadersmap 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 replace the dataLoaders map- Returns:
- A modified copy or
thisif not changed
-
withLocalMemoryAllocators
public final ImmutableSingleKernelFitnessDescriptor withLocalMemoryAllocators(Map<Integer, ? extends LocalMemoryAllocator> entries) Copy the current immutable object by replacing thelocalMemoryAllocatorsmap 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 replace the localMemoryAllocators map- Returns:
- A modified copy or
thisif not changed
-
withResultAllocators
public final ImmutableSingleKernelFitnessDescriptor withResultAllocators(Map<Integer, ? extends ResultAllocator> entries) Copy the current immutable object by replacing theresultAllocatorsmap 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 replace the resultAllocators map- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofImmutableSingleKernelFitnessDescriptorthat have equal attribute values. -
equalsByValue
-
hashCode
public int hashCode()Computes a hash code from attributes:kernelName,kernelExecutionContextComputer,staticDataLoaders,dataLoaders,localMemoryAllocators,resultAllocators. -
toString
Prints the immutable valueSingleKernelFitnessDescriptorwith attribute values. -
copyOf
Creates an immutable copy of aSingleKernelFitnessDescriptorvalue. 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
-