[Pixman] [PATCH 0/5] PRNG upgrade for pixman tests

Søren Sandmann sandmann at cs.au.dk
Thu Nov 29 04:19:11 PST 2012


Siarhei Siamashka <siarhei.siamashka at gmail.com> writes:

> A simple linear congruential generator (LCG) has been used for pixman
> test suite since the introduction of the tests based on random fuzzing.
> There was no particular reason why it was selected. The compilers are
> traditionally using LCG. So just implementing LCG for pixman tests, we
> got it as good (and as bad) as "rand" from the C library, but
> deterministic, predictable and fully under our control.
>
> But LCG has some practical issues, which are already showing up:

This patch series looks like a very nice improvement. Excellent work as
always.

> As for the SIMD implementation, I decided to take a somewhat unusual
> approach. Typically one uses CPU-specific intrinsics. This provides
> support for just one hardware platform (let's say x86 SSE2), but
> with a choice of multiple compilers (gcc, clang, icc, ...). I decided
> to do this the other way around :) And implemented the code using
> the GCC specific vector extensions:
>     http://gcc.gnu.org/onlinedocs/gcc/Vector-Extensions.html
> This means that just a single compiler is supported (GCC 4.7 or newer),
> but the code is quite conveniently optimized for multiple platforms at
> once (x86 SSE2, ARM NEON, PPC Altivec, ...).

It might be interesting to try using these extensions within pixman
itself as a fallback for the cases where we don't have CPU specific fast
paths.


Søren


More information about the Pixman mailing list