MuldeR's Utilities for Qt
MUtilities
CPUFeatures.h
1 // MuldeR's Utilities for Qt
3 // Copyright (C) 2004-2016 LoRd_MuldeR <MuldeR2@GMX.de>
4 //
5 // This library is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 2.1 of the License, or (at your option) any later version.
9 //
10 // This library is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with this library; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 //
19 // http://www.gnu.org/licenses/lgpl-2.1.txt
21 
22 #pragma once
23 
24 //MUtils
25 #include <MUtils/Global.h>
26 
27 //Qt
28 #include <QStringList>
29 
30 namespace MUtils
31 {
32  namespace CPUFetaures
33  {
34  //CPU flags
35  static const quint32 FLAG_MMX = 0x01;
36  static const quint32 FLAG_SSE = 0x02;
37  static const quint32 FLAG_SSE2 = 0x04;
38  static const quint32 FLAG_SSE3 = 0x08;
39  static const quint32 FLAG_SSSE3 = 0x10;
40  static const quint32 FLAG_SSE4 = 0x20;
41  static const quint32 FLAG_SSE42 = 0x40;
42  static const quint32 FLAG_AVX = 0x80;
43 
44  //CPU features
45  typedef struct _cpu_info_t
46  {
47  quint32 family;
48  quint32 model;
49  quint32 stepping;
50  quint32 count;
51  quint32 features;
52  bool x64;
53  bool intel;
54  char vendor[0x40];
55  char brand[0x40];
56  }
57  cpu_info_t;
58 
59  MUTILS_API cpu_info_t detect(void);
60  }
61 }
This file contains miscellaneous functions that are generally useful for Qt-based applications...
Definition: CPUFeatures.h:45
Definition: CPUFeatures.h:30