Enum Class Parallelism

java.lang.Object
java.lang.Enum<Parallelism>
org.ojalgo.concurrent.Parallelism
All Implemented Interfaces:
Serializable, Comparable<Parallelism>, Constable, IntSupplier, ParallelismSupplier

public enum Parallelism extends Enum<Parallelism> implements ParallelismSupplier
A set of standard levels of parallelsim derived from the number of available cores and optionally capped by reserving a specified amount of memory per thread. The info about available cores/threads/memory comes from OjAlgoUtils.ENVIRONMENT.
  • Enum Constant Details

    • THREADS

      public static final Parallelism THREADS
      The total number of threads (incl. hyperthreads)
    • CORES

      public static final Parallelism CORES
      The number of CPU cores
    • UNITS

      public static final Parallelism UNITS
      The number of CPU:s or, more precisely, top level (L3) cache units. It is generally assumed that there is one L3 cache unit per CPU.
    • EIGHT

      public static final Parallelism EIGHT
      8
    • FOUR

      public static final Parallelism FOUR
      4
    • TWO

      public static final Parallelism TWO
      2
    • ONE

      public static final Parallelism ONE
      1
  • Field Details

  • Constructor Details

  • Method Details

    • values

      public static Parallelism[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Parallelism valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getAsInt

      public int getAsInt()
      Specified by:
      getAsInt in interface IntSupplier