diff options
author | Darren Hsieh <darren.hsieh@sifive.com> | 2023-04-01 07:11:11 -0700 |
---|---|---|
committer | libyuv LUCI CQ <libyuv-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-04-06 15:58:29 +0000 |
commit | aa47d668d8c531b0e4e775b236d25b3ad08372f0 (patch) | |
tree | 5560098a50850ea20cb3745dfe79a6ea45f9157c /include | |
parent | ec48e4328eac1f137dc6eff8d6f1dd38810fe583 (diff) | |
download | libyuv-aa47d668d8c531b0e4e775b236d25b3ad08372f0.tar.gz |
Add riscv cpu info detection.
* Supports:
* The standard single-letter Vector detection.
* Vector fp16 detection.
Signed-off-by: Darren Hsieh <darren.hsieh@sifive.com>
Change-Id: Ia7ee1bd8ec1a990f1b2b1700805942e99c0aa87b
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/4401738
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/libyuv/cpu_id.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/libyuv/cpu_id.h b/include/libyuv/cpu_id.h index fb90c6c7..203f7e0d 100644 --- a/include/libyuv/cpu_id.h +++ b/include/libyuv/cpu_id.h @@ -55,6 +55,11 @@ static const int kCpuHasLOONGARCH = 0x2000000; static const int kCpuHasLSX = 0x4000000; static const int kCpuHasLASX = 0x8000000; +// These flags are only valid on RISCV processors. +static const int kCpuHasRISCV = 0x10000000; +static const int kCpuHasRVV = 0x20000000; +static const int kCpuHasRVVZVFH = 0x40000000; + // Optional init function. TestCpuFlag does an auto-init. // Returns cpu_info flags. LIBYUV_API @@ -78,6 +83,8 @@ LIBYUV_API int ArmCpuCaps(const char* cpuinfo_name); LIBYUV_API int MipsCpuCaps(const char* cpuinfo_name); +LIBYUV_API +int RiscvCpuCaps(const char* cpuinfo_name); // For testing, allow CPU flags to be disabled. // ie MaskCpuFlags(~kCpuHasSSSE3) to disable SSSE3. |