Perform tests and benchmarks for the specified cpu flag if supported by the host */
| 867 | |
| 868 | /* Perform tests and benchmarks for the specified cpu flag if supported by the host */ |
| 869 | static void check_cpu_flag(const char *name, int flag) |
| 870 | { |
| 871 | int old_cpu_flag = state.cpu_flag; |
| 872 | |
| 873 | flag |= old_cpu_flag; |
| 874 | av_force_cpu_flags(-1); |
| 875 | state.cpu_flag = flag & av_get_cpu_flags(); |
| 876 | av_force_cpu_flags(state.cpu_flag); |
| 877 | |
| 878 | if (!flag || state.cpu_flag != old_cpu_flag) { |
| 879 | int i; |
| 880 | |
| 881 | state.cpu_flag_name = name; |
| 882 | for (i = 0; tests[i].func; i++) { |
| 883 | if (state.test_pattern && wildstrcmp(tests[i].name, state.test_pattern)) |
| 884 | continue; |
| 885 | state.current_test_name = tests[i].name; |
| 886 | tests[i].func(); |
| 887 | } |
| 888 | } |
| 889 | } |
| 890 | |
| 891 | /* Print the name of the current CPU flag, but only do it once */ |
| 892 | static void print_cpu_name(void) |
no test coverage detected