source: CIVL/examples/omp/DataRaceBench/micro-benchmarks/truedepfirstdimension-orig-yes.c@ af3b8e4

1.23 2.0 acw/focus-triggers main test-branch
Last change on this file since af3b8e4 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: 410 bytes
Line 
1/*
2 * Outer loop has loop carried true dependence
3 */
4#include <stdlib.h>
5#include <stdio.h>
6int main(int argc, char* argv[])
7{
8 int i,j;
9 int n=1000, m=1000;
10 double b[1000][1000];
11
12 for (i=0; i<n; i++)
13 for (j=0; j<m; j++)
14 b[i][j] = 0.5;
15
16#pragma omp parallel for
17 for (i=1;i<n;i++)
18 for (j=1;j<m;j++)
19 b[i][j]=b[i-1][j-1];
20
21 printf("b[500][500]=%f\n", b[500][500]);
22 return 0;
23}
Note: See TracBrowser for help on using the repository browser.