All Known Subinterfaces:
AMDCPUInfo, IntelCPUInfo, VIACPUInfo
All Known Implementing Classes:
AMDInfoImpl, CPUIDCPUInfo, IntelInfoImpl, VIAInfoImpl

public interface CPUInfo
An interface for classes that provide lowlevel information about CPU's
  • Method Summary

    All Methods
    Modifier and Type
    Method
    Description
    Gets the CPU model description.
    Gets the CPU vendor.
    boolean
    Also known as LZCNT
    boolean
    Intel Multi-Precision Add-Carry Instruction Extensions Available in Broadwell.
    boolean
    Checks if CPU supports the AES-NI instruction set.
    boolean
    Checks if CPU supports the AVX instruction set.
    boolean
    Checks if CPU supports the AVX2 instruction set.
    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
    Checks if CPU supports the BMI1 instruction set.
    boolean
    Checks if CPU supports the BMI2 instruction set.
    boolean
    Checks if CPU supports the FMA3 instruction set.
    boolean
    Checks if CPU supports the MMX instruction set.
    boolean
    Checks if CPU supports the MOVBE instruction set.
    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)
    boolean
    Checks if CPU supports the 64-bit support.
  • Method Details

    • getVendor

      String getVendor()
      Gets the CPU vendor.
      Returns:
      A string indicating the vendor of the CPU.
    • getCPUModelString

      String getCPUModelString() throws UnknownCPUException
      Gets the CPU model description.
      Returns:
      A string detailing what type of CPU that is present in the machine. I.e. 'Pentium IV' etc.
      Throws:
      UnknownCPUException - If for any reason the retrieval of the requested information failed. The message encapsulated in the exception indicates the cause of the failure.
    • hasMMX

      boolean hasMMX()
      Checks if CPU supports the MMX instruction set.
      Returns:
      true iff CPU supports the MMX instruction set.
    • hasSSE

      boolean hasSSE()
      Checks if CPU supports the SSE instruction set.
      Returns:
      true iff the CPU supports the SSE instruction set.
    • hasSSE2

      boolean hasSSE2()
      Checks if CPU supports the SSE2 instruction set.
      Returns:
      true iff the CPU supports the SSE2 instruction set.
    • hasSSE3

      boolean hasSSE3()
      Checks if CPU supports the SSE3 instruction set.
      Returns:
      true iff the CPU supports the SSE3 instruction set.
    • hasSSE41

      boolean hasSSE41()
      Checks if CPU supports the SSE4.1 instruction set.
      Returns:
      true iff the CPU supports the SSE4.1 instruction set.
    • hasSSE42

      boolean hasSSE42()
      Checks if CPU supports the SSE4.2 instruction set.
      Returns:
      true iff the CPU supports the SSE4.2 instruction set.
    • hasSSE4A

      boolean hasSSE4A()
      AMD K10 only. Not supported on Intel. ref: https://en.wikipedia.org/wiki/SSE4.2#SSE4a
      Returns:
      true iff the CPU supports the SSE4A instruction set.
    • hasAVX

      boolean hasAVX()
      Checks if CPU supports the AVX instruction set.
      Returns:
      true iff the CPU supports the AVX instruction set.
    • hasAVX2

      boolean hasAVX2()
      Checks if CPU supports the AVX2 instruction set.
      Returns:
      true iff the CPU supports the AVX2 instruction set.
    • hasAVX512

      boolean hasAVX512()
      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. Only the core extension AVX-512F (AVX-512 Foundation) is required by all implementations. ref: https://en.wikipedia.org/wiki/AVX-512
      Returns:
      true iff the CPU supports the AVX-512 Foundation instruction set.
    • hasADX

      boolean hasADX()
      Intel Multi-Precision Add-Carry Instruction Extensions Available in Broadwell. Unused until GMP 6.1.
      Returns:
      true iff the CPU supports the ADX instruction set.
    • hasTBM

      boolean hasTBM()
      Trailing Bit Manipulation (AMD feature)
      Returns:
      true iff the CPU supports TBM.
    • hasAES

      boolean hasAES()
      Checks if CPU supports the AES-NI instruction set.
      Returns:
      true iff the CPU supports the AES-NI instruction set.
    • hasX64

      boolean hasX64()
      Checks if CPU supports the 64-bit support.
      Returns:
      true iff the CPU supports the 64-bit support.
    • hasBMI1

      boolean hasBMI1()
      Checks if CPU supports the BMI1 instruction set.
      Returns:
      true iff the CPU supports the BMI1 instruction set.
    • hasBMI2

      boolean hasBMI2()
      Checks if CPU supports the BMI2 instruction set.
      Returns:
      true iff the CPU supports the BMI2 instruction set.
    • hasFMA3

      boolean hasFMA3()
      Checks if CPU supports the FMA3 instruction set.
      Returns:
      true iff the CPU supports the FMA3 instruction set.
    • hasMOVBE

      boolean hasMOVBE()
      Checks if CPU supports the MOVBE instruction set.
      Returns:
      true iff the CPU supports the MOVBE instruction set.
    • hasABM

      boolean hasABM()
      Also known as LZCNT
      Returns:
      true iff the CPU supports the ABM instruction set.