mirror of
https://github.com/love2d/megasource.git
synced 2026-08-12 08:30:59 +02:00
26 lines
416 B
C++
26 lines
416 B
C++
#ifndef CORE_CPU_CAPS_H
|
|
#define CORE_CPU_CAPS_H
|
|
|
|
#include <optional>
|
|
#include <string>
|
|
|
|
|
|
inline int CPUCapFlags{0};
|
|
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 */
|