diff options
author | Ashkan Aliabadi <ashkan.aliabadi@gmail.com> | 2020-05-08 20:40:33 -0700 |
---|---|---|
committer | David Reiss <dreiss@fb.com> | 2020-05-11 09:57:00 -0700 |
commit | c2092219e7c874783a00a62edb94ddc672f57ab3 (patch) | |
tree | 87c8ea93fb7e78de4243ae874fc0686c20ef26fc /include/cpuinfo.h | |
parent | 2b14e445016dd46f7de821cdf3093e2823b9ab21 (diff) | |
download | cpuinfo-c2092219e7c874783a00a62edb94ddc672f57ab3.tar.gz |
Upstream cpuinfo updates in XNNPACK as of XNNPACK:d793f6c2ec145be3ddbffea951e6e5480f4646b8.
Diffstat (limited to 'include/cpuinfo.h')
-rw-r--r-- | include/cpuinfo.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/include/cpuinfo.h b/include/cpuinfo.h index 903d1cf..e89a4c1 100644 --- a/include/cpuinfo.h +++ b/include/cpuinfo.h @@ -499,11 +499,11 @@ enum cpuinfo_uarch { /** Applied Micro X-Gene. */ cpuinfo_uarch_xgene = 0x00B00100, - /** Huawei hisilicon Kunpeng Series CPU. */ - cpuinfo_uarch_taishanv110 = 0x00C00100, - /* Hygon Dhyana (a modification of AMD Zen for Chinese market). */ cpuinfo_uarch_dhyana = 0x01000100, + + /** HiSilicon TaiShan v110 (Huawei Kunpeng 920 series processors). */ + cpuinfo_uarch_taishan_v110 = 0x00C00100, }; struct cpuinfo_processor { @@ -523,7 +523,7 @@ struct cpuinfo_processor { */ int linux_id; #endif -#if defined(_WIN32) +#if defined(_WIN32) || defined(__CYGWIN__) /** Windows-specific ID for the group containing the logical processor. */ uint16_t windows_group_id; /** @@ -1799,13 +1799,22 @@ const struct cpuinfo_core* CPUINFO_ABI cpuinfo_get_current_core(void); /** * Identify the microarchitecture index of the core that executes the current thread. - * If the system does not support such identification, the function return 0. + * If the system does not support such identification, the function returns 0. * * There is no guarantee that the thread will stay on the same type of core for any time. * Callers should treat the result as only a hint. */ uint32_t CPUINFO_ABI cpuinfo_get_current_uarch_index(void); +/** + * Identify the microarchitecture index of the core that executes the current thread. + * If the system does not support such identification, the function returns the user-specified default value. + * + * There is no guarantee that the thread will stay on the same type of core for any time. + * Callers should treat the result as only a hint. + */ +uint32_t CPUINFO_ABI cpuinfo_get_current_uarch_index_with_default(uint32_t default_uarch_index); + #ifdef __cplusplus } /* extern "C" */ #endif |