Package org.ojalgo.machine
Class CommonMachine
java.lang.Object
org.ojalgo.machine.BasicMachine
org.ojalgo.machine.CommonMachine
- Direct Known Subclasses:
Hardware
,VirtualMachine
Stuff common to
Hardware
and VirtualMachine
.-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal String
final long
The size of one top level (L3 or L2) cache unit in bytes.final int
The total number of processor cores.(package private) static final long
final int
The number of top level (L3 or L2) cache units.Fields inherited from class org.ojalgo.machine.BasicMachine
memory, threads
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CommonMachine
(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, Runtime runtime) (package private)
CommonMachine
(VirtualMachine base, int modUnits, int modCores, int modThreads) -
Method Summary
Methods inherited from class org.ojalgo.machine.BasicMachine
toString
-
Field Details
-
K
static final long K- See Also:
-
architecture
-
cache
public final long cacheThe size of one top level (L3 or L2) cache unit in bytes. -
cores
public final int coresThe total number of processor cores. -
units
public final int unitsThe 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 Details
-
CommonMachine
-
CommonMachine
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 Details
-
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
- 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()
-