mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-02 21:01:56 +00:00
tests/cpu: print the RISC-V Vector length
This commit is contained in:
parent
fd8cbfec3d
commit
42dd1f1cf1
@ -25,6 +25,8 @@
|
|||||||
|
|
||||||
#if ARCH_AARCH64
|
#if ARCH_AARCH64
|
||||||
#include "libavutil/aarch64/cpu.h"
|
#include "libavutil/aarch64/cpu.h"
|
||||||
|
#elif ARCH_RISCV
|
||||||
|
#include "libavutil/riscv/cpu.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_UNISTD_H
|
#if HAVE_UNISTD_H
|
||||||
@ -170,6 +172,12 @@ int main(int argc, char **argv)
|
|||||||
#if ARCH_AARCH64 && HAVE_SVE
|
#if ARCH_AARCH64 && HAVE_SVE
|
||||||
if (cpu_flags_raw & AV_CPU_FLAG_SVE)
|
if (cpu_flags_raw & AV_CPU_FLAG_SVE)
|
||||||
printf("sve_vector_length = %d\n", 8 * ff_aarch64_sve_length());
|
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
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user