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().

  • Field Details

    • name

      private final String 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

      public String name()
      Specified by:
      name in interface KernelInfo
      Returns:
      The value of the name attribute
    • workGroupSize

      public long workGroupSize()
      Specified by:
      workGroupSize in interface KernelInfo
      Returns:
      The value of the workGroupSize attribute
    • preferredWorkGroupSizeMultiple

      public long preferredWorkGroupSizeMultiple()
      Specified by:
      preferredWorkGroupSizeMultiple in interface KernelInfo
      Returns:
      The value of the preferredWorkGroupSizeMultiple attribute
    • localMemSize

      public long localMemSize()
      Specified by:
      localMemSize in interface KernelInfo
      Returns:
      The value of the localMemSize attribute
    • privateMemSize

      public long privateMemSize()
      Specified by:
      privateMemSize in interface KernelInfo
      Returns:
      The value of the privateMemSize attribute
    • withName

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

      public final ImmutableKernelInfo withWorkGroupSize(long value)
      Copy the current immutable object by setting a value for the workGroupSize attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for workGroupSize
      Returns:
      A modified copy of the this object
    • withPreferredWorkGroupSizeMultiple

      public final ImmutableKernelInfo withPreferredWorkGroupSizeMultiple(long value)
      Copy the current immutable object by setting a value for the preferredWorkGroupSizeMultiple attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for preferredWorkGroupSizeMultiple
      Returns:
      A modified copy of the this object
    • withLocalMemSize

      public final ImmutableKernelInfo withLocalMemSize(long value)
      Copy the current immutable object by setting a value for the localMemSize attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for localMemSize
      Returns:
      A modified copy of the this object
    • withPrivateMemSize

      public final ImmutableKernelInfo withPrivateMemSize(long value)
      Copy the current immutable object by setting a value for the privateMemSize attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for privateMemSize
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of ImmutableKernelInfo 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, ImmutableKernelInfo another)
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: name, workGroupSize, preferredWorkGroupSizeMultiple, localMemSize, privateMemSize.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ImmutableKernelInfo copyOf(KernelInfo instance)
      Creates an immutable copy of a KernelInfo 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

      public static ImmutableKernelInfo.Builder builder()
      Creates a builder for ImmutableKernelInfo.
       ImmutableKernelInfo.builder()
          .name(String) // required name
          .workGroupSize(long) // required workGroupSize
          .preferredWorkGroupSizeMultiple(long) // required preferredWorkGroupSizeMultiple
          .localMemSize(long) // required localMemSize
          .privateMemSize(long) // required privateMemSize
          .build();
       
      Returns:
      A new ImmutableKernelInfo builder