diff --git a/docs/d2/db5/_c_p_u_features_8h.html b/docs/d2/db5/_c_p_u_features_8h.html index b469211..b53ad2a 100644 --- a/docs/d2/db5/_c_p_u_features_8h.html +++ b/docs/d2/db5/_c_p_u_features_8h.html @@ -135,15 +135,24 @@ Variables static const quint32 MUtils::CPUFetaures::FLAG_SSSE3 = 0x020U  CPU feature flag. More...
  -static const quint32 MUtils::CPUFetaures::FLAG_SSE4 = 0x030U - CPU feature flag. More...
-  +static const quint32 MUtils::CPUFetaures::FLAG_SSE41 = 0x040U + CPU feature flag. More...
+  static const quint32 MUtils::CPUFetaures::FLAG_SSE42 = 0x080U  CPU feature flag. More...
  static const quint32 MUtils::CPUFetaures::FLAG_AVX = 0x100U  CPU feature flag. More...
  +static const quint32 MUtils::CPUFetaures::FLAG_AVX2 = 0x200U + CPU feature flag. More...
+  +static const quint32 MUtils::CPUFetaures::FLAG_FMA3 = 0x400U + CPU feature flag. More...
+  +static const quint32 MUtils::CPUFetaures::FLAG_LZCNT = 0x800U + CPU feature flag. More...

Detailed Description

This file contains function for detecting information about the CPU.

diff --git a/docs/d2/db5/_c_p_u_features_8h_source.html b/docs/d2/db5/_c_p_u_features_8h_source.html index a18943e..59e1eb3 100644 --- a/docs/d2/db5/_c_p_u_features_8h_source.html +++ b/docs/d2/db5/_c_p_u_features_8h_source.html @@ -67,31 +67,34 @@ $(function() {
CPUFeatures.h
-Go to the documentation of this file.
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 
29 #pragma once
30 
31 //MUtils
32 #include <MUtils/Global.h>
33 
34 //Qt
35 #include <QStringList>
36 
37 namespace MUtils
38 {
44  namespace CPUFetaures
45  {
46  // CPU vendor flag
47  static const quint8 VENDOR_INTEL = 0x01U;
48  static const quint8 VENDOR_AMD = 0x02U;
49 
50  // CPU feature flag
51  static const quint32 FLAG_CMOV = 0x001U;
52  static const quint32 FLAG_MMX = 0x002U;
53  static const quint32 FLAG_SSE = 0x004U;
54  static const quint32 FLAG_SSE2 = 0x008U;
55  static const quint32 FLAG_SSE3 = 0x010U;
56  static const quint32 FLAG_SSSE3 = 0x020U;
57  static const quint32 FLAG_SSE4 = 0x030U;
58  static const quint32 FLAG_SSE42 = 0x080U;
59  static const quint32 FLAG_AVX = 0x100U;
60 
64  typedef struct _cpu_info_t
65  {
66  quint32 family;
67  quint32 model;
68  quint32 stepping;
69  quint32 count;
70  quint32 features;
71  bool x64;
72  quint8 vendor;
73  char idstr[13];
74  char brand[48];
75  }
76  cpu_info_t;
77 
85  MUTILS_API cpu_info_t detect(void);
86  }
87 }
quint32 family
CPU family indicator, which specifies the processor "generation" to which the CPU belongs...
Definition: CPUFeatures.h:66
-
static const quint32 FLAG_SSE4
CPU feature flag.
Definition: CPUFeatures.h:57
+Go to the documentation of this file.
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 
29 #pragma once
30 
31 //MUtils
32 #include <MUtils/Global.h>
33 
34 //Qt
35 #include <QStringList>
36 
37 namespace MUtils
38 {
44  namespace CPUFetaures
45  {
46  // CPU vendor flag
47  static const quint8 VENDOR_INTEL = 0x01U;
48  static const quint8 VENDOR_AMD = 0x02U;
49 
50  // CPU feature flag
51  static const quint32 FLAG_CMOV = 0x001U;
52  static const quint32 FLAG_MMX = 0x002U;
53  static const quint32 FLAG_SSE = 0x004U;
54  static const quint32 FLAG_SSE2 = 0x008U;
55  static const quint32 FLAG_SSE3 = 0x010U;
56  static const quint32 FLAG_SSSE3 = 0x020U;
57  static const quint32 FLAG_SSE41 = 0x040U;
58  static const quint32 FLAG_SSE42 = 0x080U;
59  static const quint32 FLAG_AVX = 0x100U;
60  static const quint32 FLAG_AVX2 = 0x200U;
61  static const quint32 FLAG_FMA3 = 0x400U;
62  static const quint32 FLAG_LZCNT = 0x800U;
63 
67  typedef struct _cpu_info_t
68  {
69  quint32 family;
70  quint32 model;
71  quint32 stepping;
72  quint32 count;
73  quint32 features;
74  bool x64;
75  quint8 vendor;
76  char idstr[13];
77  char brand[48];
78  }
79  cpu_info_t;
80 
88  MUTILS_API cpu_info_t detect(void);
89  }
90 }
quint32 family
CPU family indicator, which specifies the processor "generation" to which the CPU belongs...
Definition: CPUFeatures.h:69
This file contains miscellaneous functions that are generally useful for Qt-based applications...
-
quint32 stepping
CPU stepping indicator, which is used to distinguish "revisions" of a certain processor model...
Definition: CPUFeatures.h:68
+
quint32 stepping
CPU stepping indicator, which is used to distinguish "revisions" of a certain processor model...
Definition: CPUFeatures.h:71
static const quint32 FLAG_SSE
CPU feature flag.
Definition: CPUFeatures.h:53
-
quint32 features
CPU feature flags, indicating suppoprt for extended instruction sets; all flags are OR-combined...
Definition: CPUFeatures.h:70
-
Struct to hold information about the CPU. See _cpu_info_t for details!
Definition: CPUFeatures.h:64
-
quint32 count
The number of available (logical) processors.
Definition: CPUFeatures.h:69
+
quint32 features
CPU feature flags, indicating suppoprt for extended instruction sets; all flags are OR-combined...
Definition: CPUFeatures.h:73
+
static const quint32 FLAG_AVX2
CPU feature flag.
Definition: CPUFeatures.h:60
+
Struct to hold information about the CPU. See _cpu_info_t for details!
Definition: CPUFeatures.h:67
+
quint32 count
The number of available (logical) processors.
Definition: CPUFeatures.h:72
static const quint32 FLAG_SSE3
CPU feature flag.
Definition: CPUFeatures.h:55
static const quint32 FLAG_SSSE3
CPU feature flag.
Definition: CPUFeatures.h:56
static const quint8 VENDOR_AMD
CPU vendor flag.
Definition: CPUFeatures.h:48
struct MUtils::CPUFetaures::_cpu_info_t cpu_info_t
Struct to hold information about the CPU. See _cpu_info_t for details!
static const quint32 FLAG_SSE42
CPU feature flag.
Definition: CPUFeatures.h:58
-
quint8 vendor
CPU vendor flag; might be zero, if vendor is unknown.
Definition: CPUFeatures.h:72
+
quint8 vendor
CPU vendor flag; might be zero, if vendor is unknown.
Definition: CPUFeatures.h:75
+
static const quint32 FLAG_SSE41
CPU feature flag.
Definition: CPUFeatures.h:57
+
static const quint32 FLAG_LZCNT
CPU feature flag.
Definition: CPUFeatures.h:62
MUTILS_API cpu_info_t detect(void)
Detect processor information.
-
bool x64
Indicates that the processor and the operating system support 64-Bit (AMD64/EM64T) ...
Definition: CPUFeatures.h:71
-
char brand[48]
CPU brand string, up to 48 characters (e.g. "Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz") ...
Definition: CPUFeatures.h:74
+
static const quint32 FLAG_FMA3
CPU feature flag.
Definition: CPUFeatures.h:61
+
bool x64
Indicates that the processor and the operating system support 64-Bit (AMD64/EM64T) ...
Definition: CPUFeatures.h:74
+
char brand[48]
CPU brand string, up to 48 characters (e.g. "Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz") ...
Definition: CPUFeatures.h:77
static const quint8 VENDOR_INTEL
CPU vendor flag.
Definition: CPUFeatures.h:47
static const quint32 FLAG_CMOV
CPU feature flag.
Definition: CPUFeatures.h:51
Global MUtils namespace.
Definition: CPUFeatures.h:37
-
char idstr[13]
CPU identifier string, exactly 12 characters (e.g. "GenuineIntel" or "AuthenticAMD") ...
Definition: CPUFeatures.h:73
+
char idstr[13]
CPU identifier string, exactly 12 characters (e.g. "GenuineIntel" or "AuthenticAMD") ...
Definition: CPUFeatures.h:76
static const quint32 FLAG_SSE2
CPU feature flag.
Definition: CPUFeatures.h:54
static const quint32 FLAG_MMX
CPU feature flag.
Definition: CPUFeatures.h:52
static const quint32 FLAG_AVX
CPU feature flag.
Definition: CPUFeatures.h:59
-
quint32 model
CPU model indicator, which is used to distinguish processor "variants" within a generation.
Definition: CPUFeatures.h:67
+
quint32 model
CPU model indicator, which is used to distinguish processor "variants" within a generation.
Definition: CPUFeatures.h:70
+ +

§ FLAG_AVX2

+ +
+
+ + + + + +
+ + + + +
const quint32 MUtils::CPUFetaures::FLAG_AVX2 = 0x200U
+
+static
+
+ +

CPU feature flag.

+

Indicates that the CPU supports the AVX2 instruction set extension

+
@@ -206,6 +240,56 @@ Variables

CPU feature flag.

Indicates that the CPU supports the CMOV instruction

+ + + +

§ FLAG_FMA3

+ +
+
+ + + + + +
+ + + + +
const quint32 MUtils::CPUFetaures::FLAG_FMA3 = 0x400U
+
+static
+
+ +

CPU feature flag.

+

Indicates that the CPU supports the FMA3 instruction

+ +
+
+ +

§ FLAG_LZCNT

+ +
+
+ + + + + +
+ + + + +
const quint32 MUtils::CPUFetaures::FLAG_LZCNT = 0x800U
+
+static
+
+ +

CPU feature flag.

+

Indicates that the CPU supports the LZCNT instruction

+
@@ -308,8 +392,8 @@ Variables - -

§ FLAG_SSE4

+ +

§ FLAG_SSE41

@@ -318,7 +402,7 @@ Variables - +
const quint32 MUtils::CPUFetaures::FLAG_SSE4 = 0x030Uconst quint32 MUtils::CPUFetaures::FLAG_SSE41 = 0x040U
diff --git a/docs/namespacemembers.html b/docs/namespacemembers.html index e33927e..4cadf1a 100644 --- a/docs/namespacemembers.html +++ b/docs/namespacemembers.html @@ -92,9 +92,18 @@ $(function() {
  • FLAG_AVX : MUtils::CPUFetaures
  • +
  • FLAG_AVX2 +: MUtils::CPUFetaures +
  • FLAG_CMOV : MUtils::CPUFetaures
  • +
  • FLAG_FMA3 +: MUtils::CPUFetaures +
  • +
  • FLAG_LZCNT +: MUtils::CPUFetaures +
  • FLAG_MMX : MUtils::CPUFetaures
  • @@ -107,8 +116,8 @@ $(function() {
  • FLAG_SSE3 : MUtils::CPUFetaures
  • -
  • FLAG_SSE4 -: MUtils::CPUFetaures +
  • FLAG_SSE41 +: MUtils::CPUFetaures
  • FLAG_SSE42 : MUtils::CPUFetaures diff --git a/docs/namespacemembers_vars.html b/docs/namespacemembers_vars.html index 6550a69..d6c4a7e 100644 --- a/docs/namespacemembers_vars.html +++ b/docs/namespacemembers_vars.html @@ -63,9 +63,18 @@ $(function() {
  • FLAG_AVX : MUtils::CPUFetaures
  • +
  • FLAG_AVX2 +: MUtils::CPUFetaures +
  • FLAG_CMOV : MUtils::CPUFetaures
  • +
  • FLAG_FMA3 +: MUtils::CPUFetaures +
  • +
  • FLAG_LZCNT +: MUtils::CPUFetaures +
  • FLAG_MMX : MUtils::CPUFetaures
  • @@ -78,8 +87,8 @@ $(function() {
  • FLAG_SSE3 : MUtils::CPUFetaures
  • -
  • FLAG_SSE4 -: MUtils::CPUFetaures +
  • FLAG_SSE41 +: MUtils::CPUFetaures
  • FLAG_SSE42 : MUtils::CPUFetaures diff --git a/docs/search/all_5.js b/docs/search/all_5.js index afb4192..e068035 100644 --- a/docs/search/all_5.js +++ b/docs/search/all_5.js @@ -3,12 +3,15 @@ var searchData= ['family',['family',['../dd/de2/struct_m_utils_1_1_c_p_u_fetaures_1_1__cpu__info__t.html#afefb6e7d6165b8de9bee1f17df826392',1,'MUtils::CPUFetaures::_cpu_info_t']]], ['features',['features',['../dd/de2/struct_m_utils_1_1_c_p_u_fetaures_1_1__cpu__info__t.html#a8f312e3386a9f56a8d10b890af3ce3af',1,'MUtils::CPUFetaures::_cpu_info_t']]], ['flag_5favx',['FLAG_AVX',['../d3/d02/namespace_m_utils_1_1_c_p_u_fetaures.html#ad8a4de23ab21ecd4871358e7edea90cb',1,'MUtils::CPUFetaures']]], + ['flag_5favx2',['FLAG_AVX2',['../d3/d02/namespace_m_utils_1_1_c_p_u_fetaures.html#a9d8a032c0fdeb501e4a39826ab2aa23c',1,'MUtils::CPUFetaures']]], ['flag_5fcmov',['FLAG_CMOV',['../d3/d02/namespace_m_utils_1_1_c_p_u_fetaures.html#adf2416d7ed2553f313fb08c289365f5c',1,'MUtils::CPUFetaures']]], + ['flag_5ffma3',['FLAG_FMA3',['../d3/d02/namespace_m_utils_1_1_c_p_u_fetaures.html#a0700ba3ad4c671b7a6465b871bd60d2a',1,'MUtils::CPUFetaures']]], + ['flag_5flzcnt',['FLAG_LZCNT',['../d3/d02/namespace_m_utils_1_1_c_p_u_fetaures.html#acac041ff2292d32c1bd3f26f61486a01',1,'MUtils::CPUFetaures']]], ['flag_5fmmx',['FLAG_MMX',['../d3/d02/namespace_m_utils_1_1_c_p_u_fetaures.html#a1c2235ceac6576dace2a0ea9ddc1cbdf',1,'MUtils::CPUFetaures']]], ['flag_5fsse',['FLAG_SSE',['../d3/d02/namespace_m_utils_1_1_c_p_u_fetaures.html#a02a1dd90366db8200e38299635e54a90',1,'MUtils::CPUFetaures']]], ['flag_5fsse2',['FLAG_SSE2',['../d3/d02/namespace_m_utils_1_1_c_p_u_fetaures.html#a9ba4833265029796db9279e9bd8beae8',1,'MUtils::CPUFetaures']]], ['flag_5fsse3',['FLAG_SSE3',['../d3/d02/namespace_m_utils_1_1_c_p_u_fetaures.html#a52bb099e73cb9f6d02ef6ac9f89b4061',1,'MUtils::CPUFetaures']]], - ['flag_5fsse4',['FLAG_SSE4',['../d3/d02/namespace_m_utils_1_1_c_p_u_fetaures.html#af9c23f847bf250fe26ee353b57f8db3f',1,'MUtils::CPUFetaures']]], + ['flag_5fsse41',['FLAG_SSE41',['../d3/d02/namespace_m_utils_1_1_c_p_u_fetaures.html#a425bc8f89d64bf6dafdbd00c89b9874b',1,'MUtils::CPUFetaures']]], ['flag_5fsse42',['FLAG_SSE42',['../d3/d02/namespace_m_utils_1_1_c_p_u_fetaures.html#afcb03b5edb1518bfca9984ff9ccc4f99',1,'MUtils::CPUFetaures']]], ['flag_5fssse3',['FLAG_SSSE3',['../d3/d02/namespace_m_utils_1_1_c_p_u_fetaures.html#a5125a29c37e57656f45ad168e654fd05',1,'MUtils::CPUFetaures']]] ]; diff --git a/docs/search/variables_2.js b/docs/search/variables_2.js index afb4192..e068035 100644 --- a/docs/search/variables_2.js +++ b/docs/search/variables_2.js @@ -3,12 +3,15 @@ var searchData= ['family',['family',['../dd/de2/struct_m_utils_1_1_c_p_u_fetaures_1_1__cpu__info__t.html#afefb6e7d6165b8de9bee1f17df826392',1,'MUtils::CPUFetaures::_cpu_info_t']]], ['features',['features',['../dd/de2/struct_m_utils_1_1_c_p_u_fetaures_1_1__cpu__info__t.html#a8f312e3386a9f56a8d10b890af3ce3af',1,'MUtils::CPUFetaures::_cpu_info_t']]], ['flag_5favx',['FLAG_AVX',['../d3/d02/namespace_m_utils_1_1_c_p_u_fetaures.html#ad8a4de23ab21ecd4871358e7edea90cb',1,'MUtils::CPUFetaures']]], + ['flag_5favx2',['FLAG_AVX2',['../d3/d02/namespace_m_utils_1_1_c_p_u_fetaures.html#a9d8a032c0fdeb501e4a39826ab2aa23c',1,'MUtils::CPUFetaures']]], ['flag_5fcmov',['FLAG_CMOV',['../d3/d02/namespace_m_utils_1_1_c_p_u_fetaures.html#adf2416d7ed2553f313fb08c289365f5c',1,'MUtils::CPUFetaures']]], + ['flag_5ffma3',['FLAG_FMA3',['../d3/d02/namespace_m_utils_1_1_c_p_u_fetaures.html#a0700ba3ad4c671b7a6465b871bd60d2a',1,'MUtils::CPUFetaures']]], + ['flag_5flzcnt',['FLAG_LZCNT',['../d3/d02/namespace_m_utils_1_1_c_p_u_fetaures.html#acac041ff2292d32c1bd3f26f61486a01',1,'MUtils::CPUFetaures']]], ['flag_5fmmx',['FLAG_MMX',['../d3/d02/namespace_m_utils_1_1_c_p_u_fetaures.html#a1c2235ceac6576dace2a0ea9ddc1cbdf',1,'MUtils::CPUFetaures']]], ['flag_5fsse',['FLAG_SSE',['../d3/d02/namespace_m_utils_1_1_c_p_u_fetaures.html#a02a1dd90366db8200e38299635e54a90',1,'MUtils::CPUFetaures']]], ['flag_5fsse2',['FLAG_SSE2',['../d3/d02/namespace_m_utils_1_1_c_p_u_fetaures.html#a9ba4833265029796db9279e9bd8beae8',1,'MUtils::CPUFetaures']]], ['flag_5fsse3',['FLAG_SSE3',['../d3/d02/namespace_m_utils_1_1_c_p_u_fetaures.html#a52bb099e73cb9f6d02ef6ac9f89b4061',1,'MUtils::CPUFetaures']]], - ['flag_5fsse4',['FLAG_SSE4',['../d3/d02/namespace_m_utils_1_1_c_p_u_fetaures.html#af9c23f847bf250fe26ee353b57f8db3f',1,'MUtils::CPUFetaures']]], + ['flag_5fsse41',['FLAG_SSE41',['../d3/d02/namespace_m_utils_1_1_c_p_u_fetaures.html#a425bc8f89d64bf6dafdbd00c89b9874b',1,'MUtils::CPUFetaures']]], ['flag_5fsse42',['FLAG_SSE42',['../d3/d02/namespace_m_utils_1_1_c_p_u_fetaures.html#afcb03b5edb1518bfca9984ff9ccc4f99',1,'MUtils::CPUFetaures']]], ['flag_5fssse3',['FLAG_SSSE3',['../d3/d02/namespace_m_utils_1_1_c_p_u_fetaures.html#a5125a29c37e57656f45ad168e654fd05',1,'MUtils::CPUFetaures']]] ];