/****************************************************************************** * FILE: omp_workshare2.c * DESCRIPTION: * OpenMP Example - Sections Work-sharing - C Version * In this example, the OpenMP SECTION directive is used to assign * different array operations to each thread that executes a SECTION. * AUTHOR: Blaise Barney 5/99 * LAST REVISED: 07/16/07 ******************************************************************************/ #include #include #include #define N 160 int main (int argc, char *argv[]) { int i, nthreads, tid; float a[N], b[N], c[N], d[N]; /* Some initializations */ for (i=0; i