aboutsummaryrefslogtreecommitdiffstats
path: root/core/cpu_caps.h
blob: 0826a49bd12a8d9b73320db4346545b762331b26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef CORE_CPU_CAPS_H
#define CORE_CPU_CAPS_H

#include <optional>
#include <string>


extern int CPUCapFlags;
enum {
    CPU_CAP_SSE    = 1<<0,
    CPU_CAP_SSE2   = 1<<1,
    CPU_CAP_SSE3   = 1<<2,
    CPU_CAP_SSE4_1 = 1<<3,
    CPU_CAP_NEON   = 1<<4,
};

struct CPUInfo {
    std::string mVendor;
    std::string mName;
    int mCaps{0};
};

std::optional<CPUInfo> GetCPUInfo();

#endif /* CORE_CPU_CAPS_H */