diff options
author | Marat Dukhan <marat@fb.com> | 2018-06-11 13:30:21 -0700 |
---|---|---|
committer | Marat Dukhan <marat@fb.com> | 2018-06-11 13:30:21 -0700 |
commit | de2f71e2e71bc2e7cea033d1fb196a431144c77f (patch) | |
tree | 9badcf887ebc9656785d9dc0fdc05560b4c2987f /include | |
parent | f229129396692f28d959572cf5861c36b2eb323d (diff) | |
download | cpuinfo-de2f71e2e71bc2e7cea033d1fb196a431144c77f.tar.gz |
Add cpuinfo_has_arm_neon_fp16_arith function
Diffstat (limited to 'include')
-rw-r--r-- | include/cpuinfo.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/cpuinfo.h b/include/cpuinfo.h index 39a9110..ebbacb0 100644 --- a/include/cpuinfo.h +++ b/include/cpuinfo.h @@ -1560,6 +1560,16 @@ static inline bool cpuinfo_has_arm_neon_rdm(void) { #endif } +static inline bool cpuinfo_has_arm_neon_fp16_arith(void) { + #if CPUINFO_ARCH_ARM + return cpuinfo_isa.neon && cpuinfo_isa.fp16arith; + #elif CPUINFO_ARCH_ARM64 + return cpuinfo_isa.fp16arith; + #else + return false; + #endif +} + static inline bool cpuinfo_has_arm_fp16_arith(void) { #if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64 return cpuinfo_isa.fp16arith; |