source: CIVL/examples/omp/single.c@ d4a23c3

1.23 2.0 main test-branch
Last change on this file since d4a23c3 was 9a94b18, checked in by Matthew B. Dwyer <matthewbdwyer@…>, 11 years ago

Making examples parameterizable through #define

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@1901 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 229 bytes
Line 
1#include <omp.h>
2#define N 10
3
4int main (int argc, char * argv[]){
5 double a[N];
6 int i;
7
8#pragma omp parallel
9//#pragma omp single private(i)
10if (omp_get_thread_num() == 0)
11{
12 int i;
13 for(i=0; i<N; i++)
14 a[i] = 0;
15}
16
17}
Note: See TracBrowser for help on using the repository browser.