22ML_UTILS_START_NAMESPACE
69 bool hasMMX()
const {
return _hasMMX; };
73 bool hasSSE()
const {
return _hasSSE; };
77 bool hasSSE2()
const {
return _hasSSE2; };
81 bool hasSSE3()
const {
return _hasSSE3; };
118 unsigned int &csize_l2)
const;
136 unsigned int &numCores,
137 unsigned int &numVirtualProcessors);
164 std::string _vendorID;
166 std::string _modelID;
194 unsigned int _cpuFrequency;
196 unsigned int _csize_l1;
198 unsigned int _csize_l2;
200 unsigned int _numVirtualProcessors;
202 unsigned int _numCores;
204 unsigned int _numPhysicalProcessors;
207ML_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 (something like "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 machines CPU configuration, that means the number of actual CPUs, the number of cores and...
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 mega hertz.
unsigned int getNumVirtualProcessors() const
Returns the total number of virtual processors.
#define ML_UTILS_EXPORT
Defines platform dependent DLL export macro for mlUtils.