[pulseaudio-discuss] [PATCH 2/6] tests: Test both, SSE and SSE2, sconv in cpu-test

Peter Meerwald pmeerw at pmeerw.net
Sat Jan 5 08:50:48 PST 2013


Hello,

thanks you for having a look at this!

> > SSE sconv was not tested before, only SSE2 was
> With what processor did you test?

on an i5 (which does SSE and SSE2)

sconv has code path for SSE and SSE2; sconv code path are chosen based on 
x86_flags -- modern CPUs all have SSE and SSE2, SSE2 is preferred, 
and hence the SSE2 sconv implementation will be tested and the 
SSE implementation is left out

the patch first passes exclusively the SSE2 flag to the sconv init 
function, pa_convert_func_init_sse(), then passes only the SSE flag to 
init function (provided the CPU supports SSE2 and SSE) -- so both code 
path are tested (in two separate tests)

> >  #if defined (__i386__) || defined (__amd64__)
> > -START_TEST (sconv_sse_test) {
> > +START_TEST (sconv_sse2_test) {
> 
> Maybe sort it lexicographically? 

aha

> > +    pa_log_debug("Checking SSE2 sconv (float -> s16)");
> > +    run_conv_test_float_to_s16(sse_func, orig_func, 0, TRUE, FALSE);
> > +    run_conv_test_float_to_s16(sse_func, orig_func, 1, TRUE, FALSE);
> > +    run_conv_test_float_to_s16(sse_func, orig_func, 2, TRUE, FALSE);
> > +    run_conv_test_float_to_s16(sse_func, orig_func, 3, TRUE, FALSE);
> > +    run_conv_test_float_to_s16(sse_func, orig_func, 4, TRUE, FALSE);
> > +    run_conv_test_float_to_s16(sse_func, orig_func, 5, TRUE, FALSE);
> > +    run_conv_test_float_to_s16(sse_func, orig_func, 6, TRUE, FALSE);
> > +    run_conv_test_float_to_s16(sse_func, orig_func, 7, TRUE, TRUE);
> > +}
> > +END_TEST
> 
> Am I right, that you change the SSE2 test too? If yes, could you do that
> in a separate test?

I cannot follow you; there are two tests (see below)

maybe sse_func could be renamed to sse2_func in the SSE2 test?

> >  #if defined (__i386__) || defined (__amd64__)
> > +    tcase_add_test(tc, sconv_sse2_test);
> >      tcase_add_test(tc, sconv_sse_test);
> >  #endif

regards, p.

-- 

Peter Meerwald
+43-664-2444418 (mobile)


More information about the pulseaudio-discuss mailing list