Package org.ojalgo.machine
Class CommonMachine
- java.lang.Object
-
- org.ojalgo.machine.BasicMachine
-
- org.ojalgo.machine.CommonMachine
-
- Direct Known Subclasses:
Hardware
,VirtualMachine
public abstract class CommonMachine extends BasicMachine
Stuff common toHardware
andVirtualMachine
.
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.String
architecture
long
cache
The size of one top level (L3 or L2) cache unit in bytes.int
cores
The total number of processor cores.(package private) static long
K
int
units
The number of top level (L3 or L2) cache units.-
Fields inherited from class org.ojalgo.machine.BasicMachine
memory, threads
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CommonMachine(java.lang.String arch, BasicMachine[] levels)
new MemoryThreads[] { SYSTEM, L3, L2, L1 }
ornew MemoryThreads[] { SYSTEM, L2, L1 }
or in worst casenew MemoryThreads[] { SYSTEM, L1 }
protected
CommonMachine(Hardware hardware, java.lang.Runtime runtime)
(package private)
CommonMachine(VirtualMachine base, int modUnits, int modCores, int modThreads)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description long
cache()
The total amount of top level (L3 or L2) cache memory in bytes.(package private) static long
elements(long availableMemory, long elementSize)
boolean
equals(java.lang.Object obj)
int
hashCode()
boolean
isMultiCore()
boolean
isMultiThread()
boolean
isMultiUnit()
-
Methods inherited from class org.ojalgo.machine.BasicMachine
toString
-
-
-
-
Field Detail
-
K
static final long K
- See Also:
- Constant Field Values
-
architecture
public final java.lang.String architecture
-
cache
public final long cache
The size of one top level (L3 or L2) cache unit in bytes.
-
cores
public final int cores
The total number of processor cores.
-
units
public final int units
The number of top level (L3 or L2) cache units. If there is a L3 cache this usually corresponds to the number of CPU:s.
-
-
Constructor Detail
-
CommonMachine
protected CommonMachine(Hardware hardware, java.lang.Runtime runtime)
-
CommonMachine
protected CommonMachine(java.lang.String arch, BasicMachine[] levels)
new MemoryThreads[] { SYSTEM, L3, L2, L1 }
ornew MemoryThreads[] { SYSTEM, L2, L1 }
or in worst casenew MemoryThreads[] { SYSTEM, L1 }
-
CommonMachine
CommonMachine(VirtualMachine base, int modUnits, int modCores, int modThreads)
-
-
Method Detail
-
elements
static long elements(long availableMemory, long elementSize)
-
cache
public final long cache()
The total amount of top level (L3 or L2) cache memory in bytes.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classBasicMachine
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classBasicMachine
-
isMultiCore
public final boolean isMultiCore()
-
isMultiThread
public final boolean isMultiThread()
-
isMultiUnit
public final boolean isMultiUnit()
-
-