Package org.ojalgo.concurrent
Enum Class Parallelism
- All Implemented Interfaces:
Serializable
,Comparable<Parallelism>
,Constable
,IntSupplier
,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
.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getAsInt()
static Parallelism
Returns the enum constant of this class with the specified name.static Parallelism[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from interface org.ojalgo.concurrent.ParallelismSupplier
adjustDown, adjustUp, average, decrement, divideBy, halve, increment, limit, limit, require, require, reserveBytes, reserveGigaBytes, reserveKiloBytes, reserveMegaBytes, reserveTeraBytes
-
Enum Constant Details
-
THREADS
The total number of threads (incl. hyperthreads) -
CORES
The number of CPU cores -
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
8 -
FOUR
4 -
TWO
2 -
ONE
1
-
-
Field Details
-
myValue
-
-
Constructor Details
-
Parallelism
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
getAsInt
public int getAsInt()- Specified by:
getAsInt
in interfaceIntSupplier
-