diff options
author | Søren Sandmann Pedersen <ssp@redhat.com> | 2010-10-05 09:49:45 -0400 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@redhat.com> | 2010-10-11 12:06:20 -0400 |
commit | 3f7da59352b604bd6974230d0b149e8e7da77b5c (patch) | |
tree | 38da4ef5230f9543d5b37ef19431563ee2f71c16 | |
parent | a10ccc9f303ca6b4577afe68cc6b2d8840de5a27 (diff) | |
download | pixman-3f7da59352b604bd6974230d0b149e8e7da77b5c.tar.gz |
test: Parallize composite.c with OpenMP
Each test uses the test number as the random number seed; if it
didn't, all the threads would run the same tests since they would all
start from the same seed.
-rw-r--r-- | test/composite.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/composite.c b/test/composite.c index 3a06c09..216046f 100644 --- a/test/composite.c +++ b/test/composite.c @@ -891,15 +891,17 @@ main (int argc, char **argv) return -1; } } - + +#ifdef USE_OPENMP +# pragma omp parallel for default(none) shared(result) shared(argv) +#endif for (i = 1; i <= N_TESTS; ++i) { - if (!run_test (i)) + if (!result && !run_test (i)) { printf ("Test %d failed.\n", i); - + result = i; - break; } } |