testsuite/libgomp.c/appendix-a/a.21.1.c

Go to the documentation of this file.
00001 /* { dg-do run } */
00002 
00003 #include <stdio.h>
00004 void
00005 work (int k)
00006 {
00007 #pragma omp ordered
00008   printf (" %d\n", k);
00009 }
00010 
00011 void
00012 a21 (int lb, int ub, int stride)
00013 {
00014   int i;
00015 #pragma omp parallel for ordered schedule(dynamic)
00016   for (i = lb; i < ub; i += stride)
00017     work (i);
00018 }
00019 
00020 int
00021 main ()
00022 {
00023   a21 (0, 100, 5);
00024   return 0;
00025 }

Generated on Fri Apr 5 05:38:10 2013 for Libgomp by  doxygen 1.4.7