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 Hardware.Architecturefinal longThe size of one top level (L3 or L2) cache unit in bytes.final intThe total number of processor cores.(package private) static final longfinal intThe number of top level (L3 or L2) cache units.Fields inherited from class BasicMachine
memory, threads -
Constructor Summary
ConstructorsConstructorDescriptionCommonMachine(long memoryBytes, int nbThreads, Hardware.Architecture arch, long cacheBytes, int nbCores, int nbUnits) CommonMachine(Hardware.Architecture arch, BasicMachine[] levels) new MemoryThreads[] { SYSTEM, L3, L2, L1 }ornew MemoryThreads[] { SYSTEM, L2, L1 }or in worst casenew MemoryThreads[] { SYSTEM, L1 }CommonMachine(Hardware hardware, Runtime runtime) CommonMachine(VirtualMachine base, int modUnits, int modCores, int modThreads) -
Method Summary
Methods inherited from class 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
CommonMachine(Hardware.Architecture arch, BasicMachine[] levels) new MemoryThreads[] { SYSTEM, L3, L2, L1 }ornew MemoryThreads[] { SYSTEM, L2, L1 }or in worst casenew MemoryThreads[] { SYSTEM, L1 } -
CommonMachine
CommonMachine(long memoryBytes, int nbThreads, Hardware.Architecture arch, long cacheBytes, int nbCores, int nbUnits) -
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:
equalsin classBasicMachine
-
hashCode
public int hashCode()- Overrides:
hashCodein classBasicMachine
-
isMultiCore
public final boolean isMultiCore() -
isMultiThread
public final boolean isMultiThread() -
isMultiUnit
public final boolean isMultiUnit()
-