java.lang.Object
freenet.support.CPUInformation.CPUIDCPUInfo
freenet.support.CPUInformation.VIAInfoImpl
- All Implemented Interfaces:
CPUInfo, VIACPUInfo
Moved out of CPUID.java
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static booleanTrue if the CPU takes C3 instructions.private static booleanTrue if the CPU takes Nano instructions.private static final StringThe CPU's model string, null if it could not be read; a non-null model means the CPU was correctly identified as a VIA.Constructor Summary
ConstructorsConstructorDescriptionThe model string and the C3 and Nano flags are computed once by the static initialiser, so an instance adds nothing to them.Method Summary
Methods inherited from class CPUIDCPUInfo
getVendor, hasABM, hasADX, hasAES, hasAVX, hasAVX2, hasAVX512, hasBMI1, hasBMI2, hasFMA3, hasMMX, hasMOVBE, hasSSE, hasSSE2, hasSSE3, hasSSE41, hasSSE42, hasSSE4A, hasTBMModifier and TypeMethodDescriptionGets the CPU vendor.booleanhasABM()Also known as LZCNTbooleanhasADX()Intel Multi-Precision Add-Carry Instruction Extensions Available in Broadwell.booleanhasAES()Whether the CPU supports AES.booleanhasAVX()Whether the CPU supports AVX.booleanhasAVX2()Whether the CPU supports AVX2.booleanDoes the CPU supports the AVX-512 Foundation instruction set? Quote wikipedia: AVX-512 consists of multiple extensions not all meant to be supported by all processors implementing them.booleanhasBMI1()Whether the CPU supports BMI1.booleanhasBMI2()Whether the CPU supports BMI2.booleanhasFMA3()Whether the CPU supports FMA3.booleanhasMMX()Checks if CPU supports the MMX instruction set.booleanhasMOVBE()Whether the CPU supports MOVBE.booleanhasSSE()Checks if CPU supports the SSE instruction set.booleanhasSSE2()Checks if CPU supports the SSE2 instruction set.booleanhasSSE3()Checks if CPU supports the SSE3 instruction set.booleanhasSSE41()Checks if CPU supports the SSE4.1 instruction set.booleanhasSSE42()Checks if CPU supports the SSE4.2 instruction set.booleanhasSSE4A()AMD K10 only.booleanhasTBM()Trailing Bit Manipulation (AMD feature)
Field Details
isC3Compatible
private static boolean isC3CompatibleTrue if the CPU takes C3 instructions.isNanoCompatible
private static boolean isNanoCompatibleTrue if the CPU takes Nano instructions.smodel
The CPU's model string, null if it could not be read; a non-null model means the CPU was correctly identified as a VIA.
Constructor Details
VIAInfoImpl
VIAInfoImpl()The model string and the C3 and Nano flags are computed once by the static initialiser, so an instance adds nothing to them.
Method Details
IsC3Compatible
public boolean IsC3Compatible()Description copied from interface:VIACPUInfoTest whether the installed CPU is at least an 'c3'.- Specified by:
IsC3Compatiblein interfaceVIACPUInfo- Returns:
- true if the CPU present in the machine is at least an 'c3' CPU
IsNanoCompatible
public boolean IsNanoCompatible()Description copied from interface:VIACPUInfoTest whether the installed CPU is at least a 'nano'.- Specified by:
IsNanoCompatiblein interfaceVIACPUInfo- Returns:
- true if the CPU present in the machine is at least an 'nano' CPU
getCPUModelString
Description copied from interface:CPUInfoGets the CPU model description.- Specified by:
getCPUModelStringin interfaceCPUInfo- Overrides:
getCPUModelStringin classCPUIDCPUInfo- Returns:
- A string detailing what type of CPU that is present in the machine. I.e. 'Pentium IV' etc.
hasX64
public boolean hasX64()Description copied from class:CPUIDCPUInfoWhether the CPU supports 64-bit mode.- Specified by:
hasX64in interfaceCPUInfo- Overrides:
hasX64in classCPUIDCPUInfo- Returns:
- true iff the CPU supports the 64-bit support
identifyCPU
Reads the CPU's model string from /proc.- Returns:
- the model, null if it cannot be read