cpu_caps.h 416 B

12345678910111213141516171819202122232425
  1. #ifndef CORE_CPU_CAPS_H
  2. #define CORE_CPU_CAPS_H
  3. #include <optional>
  4. #include <string>
  5. inline int CPUCapFlags{0};
  6. enum {
  7. CPU_CAP_SSE = 1<<0,
  8. CPU_CAP_SSE2 = 1<<1,
  9. CPU_CAP_SSE3 = 1<<2,
  10. CPU_CAP_SSE4_1 = 1<<3,
  11. CPU_CAP_NEON = 1<<4,
  12. };
  13. struct CPUInfo {
  14. std::string mVendor;
  15. std::string mName;
  16. int mCaps{0};
  17. };
  18. std::optional<CPUInfo> GetCPUInfo();
  19. #endif /* CORE_CPU_CAPS_H */