MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / check_cpu_flag

Function check_cpu_flag

tests/checkasm/checkasm.c:869–889  ·  view source on GitHub ↗

Perform tests and benchmarks for the specified cpu flag if supported by the host */

Source from the content-addressed store, hash-verified

867
868/* Perform tests and benchmarks for the specified cpu flag if supported by the host */
869static 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 */
892static void print_cpu_name(void)

Callers 1

mainFunction · 0.85

Calls 3

av_force_cpu_flagsFunction · 0.85
av_get_cpu_flagsFunction · 0.85
wildstrcmpFunction · 0.85

Tested by

no test coverage detected