java.lang.Object
freenet.support.CPUInformation.CPUIDCPUInfo
freenet.support.CPUInformation.VIAInfoImpl
All Implemented Interfaces:
CPUInfo, VIACPUInfo

class VIAInfoImplextends CPUIDCPUInfo implements VIACPUInfo
Moved out of CPUID.java
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static boolean
    True if the CPU takes C3 instructions.
    private static boolean
    True if the CPU takes Nano instructions.
    private static final String
    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 Summary

    Constructors
    Constructor
    Description
    The model string and the C3 and Nano flags are computed once by the static initialiser, so an instance adds nothing to them.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the CPU model description.
    boolean
    Whether the CPU supports 64-bit mode.
    private static String
    Reads the CPU's model string from /proc.
    boolean
    Test whether the installed CPU is at least an 'c3'.
    boolean
    Test whether the installed CPU is at least a 'nano'.

    Methods inherited from class CPUIDCPUInfo

    getVendor, hasABM, hasADX, hasAES, hasAVX, hasAVX2, hasAVX512, hasBMI1, hasBMI2, hasFMA3, hasMMX, hasMOVBE, hasSSE, hasSSE2, hasSSE3, hasSSE41, hasSSE42, hasSSE4A, hasTBM
    Modifier and Type
    Method
    Description
    Gets the CPU vendor.
    boolean
    Also known as LZCNT
    boolean
    Intel Multi-Precision Add-Carry Instruction Extensions Available in Broadwell.
    boolean
    Whether the CPU supports AES.
    boolean
    Whether the CPU supports AVX.
    boolean
    Whether the CPU supports AVX2.
    boolean
    Does 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.
    boolean
    Whether the CPU supports BMI1.
    boolean
    Whether the CPU supports BMI2.
    boolean
    Whether the CPU supports FMA3.
    boolean
    Checks if CPU supports the MMX instruction set.
    boolean
    Whether the CPU supports MOVBE.
    boolean
    Checks if CPU supports the SSE instruction set.
    boolean
    Checks if CPU supports the SSE2 instruction set.
    boolean
    Checks if CPU supports the SSE3 instruction set.
    boolean
    Checks if CPU supports the SSE4.1 instruction set.
    boolean
    Checks if CPU supports the SSE4.2 instruction set.
    boolean
    AMD K10 only.
    boolean
    Trailing Bit Manipulation (AMD feature)

    Methods inherited from class Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • isC3Compatible

      private static boolean isC3Compatible
      True if the CPU takes C3 instructions.
    • isNanoCompatible

      private static boolean isNanoCompatible
      True if the CPU takes Nano instructions.
    • smodel

      private static final String 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: VIACPUInfo
      Test whether the installed CPU is at least an 'c3'.
      Specified by:
      IsC3Compatible in interface VIACPUInfo
      Returns:
      true if the CPU present in the machine is at least an 'c3' CPU
    • IsNanoCompatible

      public boolean IsNanoCompatible()
      Description copied from interface: VIACPUInfo
      Test whether the installed CPU is at least a 'nano'.
      Specified by:
      IsNanoCompatible in interface VIACPUInfo
      Returns:
      true if the CPU present in the machine is at least an 'nano' CPU
    • getCPUModelString

      public String getCPUModelString()
      Description copied from interface: CPUInfo
      Gets the CPU model description.
      Specified by:
      getCPUModelString in interface CPUInfo
      Overrides:
      getCPUModelString in class CPUIDCPUInfo
      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: CPUIDCPUInfo
      Whether the CPU supports 64-bit mode.
      Specified by:
      hasX64 in interface CPUInfo
      Overrides:
      hasX64 in class CPUIDCPUInfo
      Returns:
      true iff the CPU supports the 64-bit support
    • identifyCPU

      private static String identifyCPU()
      Reads the CPU's model string from /proc.
      Returns:
      the model, null if it cannot be read