source: CIVL/examples/omp/DataRaceBench/micro-benchmarks/truedepseconddimension-orig-yes.c@ 3c8cc6c

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