diff options
author | Rémi Denis-Courmont <remi@remlab.net> | 2024-11-16 09:19:12 +0200 |
---|---|---|
committer | Rémi Denis-Courmont <remi@remlab.net> | 2024-11-17 11:28:21 +0200 |
commit | 42dd1f1cf13d02381c10461a7bcfcddc63ad211d (patch) | |
tree | 5fe691a4c047d3a45960837d0437f3fbe0132462 | |
parent | fd8cbfec3d2dbfc82960ddc32c094427abc13bed (diff) | |
download | ffmpeg-42dd1f1cf13d02381c10461a7bcfcddc63ad211d.tar.gz |
tests/cpu: print the RISC-V Vector length
-rw-r--r-- | libavutil/tests/cpu.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavutil/tests/cpu.c b/libavutil/tests/cpu.c index 9e45527408..1eb3055ff0 100644 --- a/libavutil/tests/cpu.c +++ b/libavutil/tests/cpu.c @@ -25,6 +25,8 @@ #if ARCH_AARCH64 #include "libavutil/aarch64/cpu.h" +#elif ARCH_RISCV +#include "libavutil/riscv/cpu.h" #endif #if HAVE_UNISTD_H @@ -170,6 +172,12 @@ int main(int argc, char **argv) #if ARCH_AARCH64 && HAVE_SVE if (cpu_flags_raw & AV_CPU_FLAG_SVE) printf("sve_vector_length = %d\n", 8 * ff_aarch64_sve_length()); +#elif ARCH_RISCV && HAVE_RVV + if (cpu_flags_raw & AV_CPU_FLAG_RVV_I32) { + size_t bytes = ff_get_rv_vlenb(); + + printf("rv_vlenb = %zu (%zu bits)\n", bytes, 8 * bytes); + } #endif return 0; |