source: CIVL/examples/omp/DataRaceBench/micro-benchmarks/inneronly1-orig-no.c@ e5cec5ae

1.23 2.0 main test-branch
Last change on this file since e5cec5ae was 36a61f3, checked in by Ziqing Luo <ziqing@…>, 9 years ago

Commit DataRaceBench into CIVL examples

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

  • Property mode set to 100644
File size: 338 bytes
Line 
1//Example with loop-carried data dependence at the outer level loop.
2
3#include <string.h>
4int main(int argc,char *argv[])
5{
6 int i;
7 int j;
8 double a[20][20];
9 memset(a,0,(sizeof(a)));
10
11 for (i = 0; i < 20 -1; i += 1) {
12#pragma omp parallel for
13 for (j = 0; j < 20; j += 1) {
14 a[i][j] += a[i + 1][j];
15 }
16 }
17 return 0;
18}
Note: See TracBrowser for help on using the repository browser.