diff options
author | Marat Dukhan <marat@fb.com> | 2017-09-26 10:53:28 -0700 |
---|---|---|
committer | Marat Dukhan <marat@fb.com> | 2017-09-26 10:53:28 -0700 |
commit | 9da4c918ea33edcc1b10409391ea1765e92b5056 (patch) | |
tree | 5fa7318f21e5ab6974616788665b5f3e41d8f80b /include | |
parent | f720d10fa663ae18854bfd32d1d13c1d519ef726 (diff) | |
download | cpuinfo-9da4c918ea33edcc1b10409391ea1765e92b5056.tar.gz |
Add cpuinfo_has_x86_sse function
Diffstat (limited to 'include')
-rw-r--r-- | include/cpuinfo.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/cpuinfo.h b/include/cpuinfo.h index 6c9d890..f244ebe 100644 --- a/include/cpuinfo.h +++ b/include/cpuinfo.h @@ -780,6 +780,20 @@ static inline bool cpuinfo_has_x86_daz(void) { #endif } +static inline bool cpuinfo_has_x86_sse(void) { + #if CPUINFO_ARCH_X86_64 + return true; + #elif CPUINFO_ARCH_X86 + #if defined(__ANDROID__) + return true; + #else + return cpuinfo_isa.sse; + #endif + #else + return false; + #endif +} + static inline bool cpuinfo_has_x86_sse2(void) { #if CPUINFO_ARCH_X86_64 return true; |