From: Søren Sandmann Pedersen Date: Tue, 5 Oct 2010 13:49:45 +0000 (-0400) Subject: test: Parallize composite.c with OpenMP X-Git-Tag: 1.0_branch~439 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3f7da59352b604bd6974230d0b149e8e7da77b5c;p=profile%2Fivi%2Fpixman.git 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. --- 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; } }