shithub: dav1d

Download patch

ref: e22a8f32bbe0221cee8bbe25e040a92021fdc0ea
parent: 4e251db1ec60f73166db2cd5e9ef582de9a46f86
author: Henrik Gramner <gramner@twoorioles.com>
date: Tue May 12 16:08:08 EDT 2020

checkasm: Skip printing the seed when using --list-functions

Also skip the AVX warmup.

--- a/tests/checkasm/checkasm.c
+++ b/tests/checkasm/checkasm.c
@@ -566,21 +566,22 @@
         argv++;
     }
 
-    fprintf(stderr, "checkasm: using random seed %u\n", state.seed);
-
     dav1d_init_cpu();
+
+    if (!state.function_listing) {
+        fprintf(stderr, "checkasm: using random seed %u\n", state.seed);
 #if ARCH_X86_64
-    void checkasm_warmup_avx2(void);
-    void checkasm_warmup_avx512(void);
-    unsigned cpu_flags = dav1d_get_cpu_flags();
-    if (cpu_flags & DAV1D_X86_CPU_FLAG_AVX512ICL)
-        state.simd_warmup = checkasm_warmup_avx512;
-    else if (cpu_flags & DAV1D_X86_CPU_FLAG_AVX2)
-        state.simd_warmup = checkasm_warmup_avx2;
-    else
-        state.simd_warmup = NULL;
-    checkasm_simd_warmup();
+        void checkasm_warmup_avx2(void);
+        void checkasm_warmup_avx512(void);
+        const unsigned cpu_flags = dav1d_get_cpu_flags();
+        if (cpu_flags & DAV1D_X86_CPU_FLAG_AVX512ICL)
+            state.simd_warmup = checkasm_warmup_avx512;
+        else if (cpu_flags & DAV1D_X86_CPU_FLAG_AVX2)
+            state.simd_warmup = checkasm_warmup_avx2;
+        checkasm_simd_warmup();
 #endif
+    }
+
     check_cpu_flag(NULL, 0);
 
     if (state.function_listing) {