Class ImmutableStageDescriptor

java.lang.Object
net.bmahe.genetics4j.gpu.spec.fitness.multistage.ImmutableStageDescriptor
All Implemented Interfaces:
StageDescriptor

@Generated("org.immutables.processor.ProxyProcessor") public final class ImmutableStageDescriptor extends Object implements StageDescriptor
Immutable implementation of StageDescriptor.

Use the builder to create immutable instances: new StageDescriptor.Builder().

  • Field Details

  • Constructor Details

  • Method Details

    • kernelName

      public String kernelName()
      Kernel name
      Specified by:
      kernelName in interface StageDescriptor
      Returns:
    • kernelExecutionContextComputer

      public KernelExecutionContextComputer kernelExecutionContextComputer()
      Computer for the kernel execution context (ex: globak work size)
      Specified by:
      kernelExecutionContextComputer in interface StageDescriptor
      Returns:
    • dataLoaders

      public Map<Integer,DataLoader> dataLoaders()
      Association of kernel argument index and a data loader
      Specified by:
      dataLoaders in interface StageDescriptor
      Returns:
    • localMemoryAllocators

      public Map<Integer,LocalMemoryAllocator> localMemoryAllocators()
      Association of kernel argument index and a local memory allocator
      Specified by:
      localMemoryAllocators in interface StageDescriptor
      Returns:
    • resultAllocators

      public Map<Integer,ResultAllocator> resultAllocators()
      Association of kernel argument index and a result allocator
      Specified by:
      resultAllocators in interface StageDescriptor
      Returns:
    • reusePreviousResultAsArguments

      public Map<Integer,Integer> reusePreviousResultAsArguments()
      Association of the kernel argument used for a result of the previous stage to the kernel argument for this execution
      Specified by:
      reusePreviousResultAsArguments in interface StageDescriptor
      Returns:
    • reusePreviousResultSizeAsArguments

      public Map<Integer,Integer> reusePreviousResultSizeAsArguments()
      Association of the size of the data from the result of the previous stage to the kernel argument for this execution
      Specified by:
      reusePreviousResultSizeAsArguments in interface StageDescriptor
      Returns:
    • mapStaticDataAsArgument

      public Map<String,Integer> mapStaticDataAsArgument()
      Association of static data to a kernel argument index
      Specified by:
      mapStaticDataAsArgument in interface StageDescriptor
    • withKernelName

      public final ImmutableStageDescriptor withKernelName(String value)
      Copy the current immutable object by setting a value for the kernelName attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for kernelName
      Returns:
      A modified copy of the this object
    • withKernelExecutionContextComputer

      public final ImmutableStageDescriptor withKernelExecutionContextComputer(KernelExecutionContextComputer value)
      Copy the current immutable object by setting a value for the kernelExecutionContextComputer attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for kernelExecutionContextComputer
      Returns:
      A modified copy of the this object
    • withDataLoaders

      public final ImmutableStageDescriptor withDataLoaders(Map<Integer,? extends DataLoader> entries)
      Copy the current immutable object by replacing the dataLoaders 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 returning this.
      Parameters:
      entries - The entries to be added to the dataLoaders map
      Returns:
      A modified copy of this object
    • withLocalMemoryAllocators

      public final ImmutableStageDescriptor withLocalMemoryAllocators(Map<Integer,? extends LocalMemoryAllocator> entries)
      Copy the current immutable object by replacing the localMemoryAllocators 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 returning this.
      Parameters:
      entries - The entries to be added to the localMemoryAllocators map
      Returns:
      A modified copy of this object
    • withResultAllocators

      public final ImmutableStageDescriptor withResultAllocators(Map<Integer,? extends ResultAllocator> entries)
      Copy the current immutable object by replacing the resultAllocators 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 returning this.
      Parameters:
      entries - The entries to be added to the resultAllocators map
      Returns:
      A modified copy of this object
    • withReusePreviousResultAsArguments

      public final ImmutableStageDescriptor withReusePreviousResultAsArguments(Map<Integer,? extends Integer> entries)
      Copy the current immutable object by replacing the reusePreviousResultAsArguments 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 returning this.
      Parameters:
      entries - The entries to be added to the reusePreviousResultAsArguments map
      Returns:
      A modified copy of this object
    • withReusePreviousResultSizeAsArguments

      public final ImmutableStageDescriptor withReusePreviousResultSizeAsArguments(Map<Integer,? extends Integer> entries)
      Copy the current immutable object by replacing the reusePreviousResultSizeAsArguments 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 returning this.
      Parameters:
      entries - The entries to be added to the reusePreviousResultSizeAsArguments map
      Returns:
      A modified copy of this object
    • withMapStaticDataAsArgument

      public final ImmutableStageDescriptor withMapStaticDataAsArgument(Map<String,? extends Integer> entries)
      Copy the current immutable object by replacing the mapStaticDataAsArgument 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 returning this.
      Parameters:
      entries - The entries to be added to the mapStaticDataAsArgument map
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of ImmutableStageDescriptor that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • equalTo

      private boolean equalTo(int synthetic, ImmutableStageDescriptor another)
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: kernelName, kernelExecutionContextComputer, dataLoaders, localMemoryAllocators, resultAllocators, reusePreviousResultAsArguments, reusePreviousResultSizeAsArguments, mapStaticDataAsArgument.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value StageDescriptor with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ImmutableStageDescriptor copyOf(StageDescriptor instance)
      Creates an immutable copy of a StageDescriptor 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 StageDescriptor instance
    • createUnmodifiableMap

      private static <K, V> Map<K,V> createUnmodifiableMap(boolean checkNulls, boolean skipNulls, Map<? extends K,? extends V> map)