22ML_UTILS_START_NAMESPACE
 
   68  bool        hasMMX()
       const { 
return _hasMMX; };
 
   72  bool        hasSSE()
       const { 
return _hasSSE; };
 
   76  bool        hasSSE2()
      const { 
return _hasSSE2; };
 
   80  bool        hasSSE3()
      const { 
return _hasSSE3; };
 
  117                            unsigned int &csize_l2) 
const;
 
  135                          unsigned int &numCores,
 
  136                          unsigned int &numVirtualProcessors);
 
  163  std::string  _vendorID;
 
  165  std::string  _modelID;
 
  193  unsigned int _cpuFrequency;
 
  195  unsigned int _csize_l1;
 
  197  unsigned int _csize_l2;
 
  199  unsigned int _numVirtualProcessors;
 
  201  unsigned int _numCores;
 
  203  unsigned int _numPhysicalProcessors;
 
 
  206ML_UTILS_END_NAMESPACE
 
Singleton class that provides hardware-specific information.
 
static CPUInfo & getInstance()
Returns the single existing object of this class.
 
bool hasSSE2() const
Returns true if SSE2 is supported.
 
unsigned int getNumCores() const
Returns the total number of cores.
 
const std::string & getVendorID() const
Returns the CPU's vendor identifier ('AuthenticAMD' for example).
 
void printInfo(std::ostream &ostr)
Formated output of system information to stdout.
 
bool has3DNow() const
Returns true if 3DNow! is supported.
 
bool hasSSE() const
Returns true if SSE is supported.
 
bool hasMMX() const
Returns true if MMX is supported.
 
void getCacheSizes(unsigned int &csize_l1, unsigned int &csize_l2) const
Returns L1 and L2 cache sizes.
 
bool isPentium() const
Returns true if this is a Pentium based system.
 
bool hasSSE3() const
Returns true if SSE3 is supported.
 
bool has3DNowP() const
Returns true if 3DNow+ is supported.
 
bool hasSSE4a() const
Returns true if SSE4a is supported.
 
bool hasSSE5() const
Returns true if SSE5 is supported.
 
unsigned int getNumPhysicalProcessors() const
Returns the total number of actual CPUs.
 
bool hasSSSE3() const
Returns true if SSSE3 is supported.
 
void getCPUCount(unsigned int &numPhysicalProcessors, unsigned int &numCores, unsigned int &numVirtualProcessors)
Returns the machine's CPU configuration; that means the number of actual CPUs, the number of cores,...
 
const std::string & getModelID() const
Returns the CPU's model identifier if supported.
 
bool hasSSE4_2() const
Returns true if SSE4.2 is supported.
 
CPUInfo()
This constructor must not be called from anywhere else but the getInstance() method (which does call ...
 
bool hasSSE4_1() const
Returns true if SSE4.1 is supported.
 
bool hasAVX() const
Returns true if AVX is supported.
 
unsigned int getCPUFrequency() const
Returns the CPU frequency in megahertz.
 
unsigned int getNumVirtualProcessors() const
Returns the total number of virtual processors.