ManaPlus
cpu.h
Go to the documentation of this file.
1 /*
2  * The ManaPlus Client
3  * Copyright (C) 2013-2019 The ManaPlus Developers
4  * Copyright (C) 2019-2021 Andrei Karas
5  *
6  * This file is part of The ManaPlus Client.
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  */
21 
22 #ifndef UTILS_CPU_H
23 #define UTILS_CPU_H
24 
25 #include "localconsts.h"
26 
27 namespace Cpu
28 {
29  enum
30  {
39  FEATURE_AVX2 = 128
40  };
41 
42  void detect();
43 
44  void printFlags();
45 
46  uint32_t getFlags();
47 } // namespace Cpu
48 
49 #endif // UTILS_CPU_H
Definition: cpu.h:28
uint32_t getFlags()
Definition: cpu.cpp:176
@ FEATURE_SSE42
Definition: cpu.h:37
@ FEATURE_MMX
Definition: cpu.h:32
@ FEATURE_AVX
Definition: cpu.h:38
@ FEATURE_SSE
Definition: cpu.h:33
@ FEATURE_AVX2
Definition: cpu.h:39
@ FEATURE_SSE2
Definition: cpu.h:34
@ FEATURE_SSE4
Definition: cpu.h:36
@ FEATURE_SSSE3
Definition: cpu.h:35
@ FEATURE_EMPTY
Definition: cpu.h:31
void printFlags()
Definition: cpu.cpp:152
void detect()
Definition: cpu.cpp:46