2019-02-16 14:05:13 +01:00
|
|
|
|
#pragma once
|
2017-07-18 15:21:29 +03:00
|
|
|
|
|
2020-12-12 15:01:29 +03:00
|
|
|
|
#include "util/types.hpp"
|
2017-07-18 15:21:29 +03:00
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
|
|
|
namespace utils
|
|
|
|
|
|
{
|
2020-12-18 12:55:54 +03:00
|
|
|
|
std::array<u32, 4> get_cpuid(u32 func, u32 subfunc);
|
|
|
|
|
|
|
|
|
|
|
|
u64 get_xgetbv(u32 xcr);
|
2018-03-23 23:08:13 +01:00
|
|
|
|
|
2017-11-09 20:33:18 +03:00
|
|
|
|
bool has_ssse3();
|
2017-07-18 15:21:29 +03:00
|
|
|
|
|
2018-04-09 17:45:37 +03:00
|
|
|
|
bool has_sse41();
|
|
|
|
|
|
|
2017-11-09 20:33:18 +03:00
|
|
|
|
bool has_avx();
|
2017-07-18 15:21:29 +03:00
|
|
|
|
|
2017-12-16 03:19:21 +03:00
|
|
|
|
bool has_avx2();
|
|
|
|
|
|
|
2017-11-09 20:33:18 +03:00
|
|
|
|
bool has_rtm();
|
2017-07-18 20:03:47 +03:00
|
|
|
|
|
2019-05-31 23:34:46 -04:00
|
|
|
|
bool has_tsx_force_abort();
|
|
|
|
|
|
|
2018-06-13 13:54:16 +02:00
|
|
|
|
bool has_mpx();
|
|
|
|
|
|
|
2020-03-10 19:21:00 +03:00
|
|
|
|
bool has_avx512();
|
2017-12-16 03:19:21 +03:00
|
|
|
|
|
2020-08-06 15:37:10 -04:00
|
|
|
|
bool has_avx512_icl();
|
|
|
|
|
|
|
2018-01-16 14:32:57 +03:00
|
|
|
|
bool has_xop();
|
|
|
|
|
|
|
2019-11-14 19:09:34 +03:00
|
|
|
|
bool has_clwb();
|
|
|
|
|
|
|
2020-04-04 14:12:06 -04:00
|
|
|
|
bool has_invariant_tsc();
|
|
|
|
|
|
|
|
|
|
|
|
bool has_fma3();
|
|
|
|
|
|
|
|
|
|
|
|
bool has_fma4();
|
|
|
|
|
|
|
2020-02-20 03:55:25 +01:00
|
|
|
|
std::string get_cpu_brand();
|
|
|
|
|
|
|
2017-07-18 15:21:29 +03:00
|
|
|
|
std::string get_system_info();
|
2019-02-16 14:05:13 +01:00
|
|
|
|
|
|
|
|
|
|
std::string get_firmware_version();
|
2019-04-19 15:05:47 +03:00
|
|
|
|
|
|
|
|
|
|
std::string get_OS_version();
|
2019-07-15 17:20:12 +03:00
|
|
|
|
|
|
|
|
|
|
ullong get_tsc_freq();
|
2020-02-20 03:55:25 +01:00
|
|
|
|
|
|
|
|
|
|
u64 get_total_memory();
|
|
|
|
|
|
|
|
|
|
|
|
u32 get_thread_count();
|
2020-12-09 21:29:48 +03:00
|
|
|
|
|
|
|
|
|
|
u32 get_cpu_family();
|
|
|
|
|
|
|
|
|
|
|
|
u32 get_cpu_model();
|
2021-03-06 20:02:16 +03:00
|
|
|
|
|
|
|
|
|
|
extern const u64 main_tid;
|
2017-07-18 15:21:29 +03:00
|
|
|
|
}
|