source:
CIVL/examples/omp/DataRaceBench/micro-benchmarks/doallchar-orig-no.c@
af3b8e4
| Last change on this file since af3b8e4 was 36a61f3, checked in by , 9 years ago | |
|---|---|
|
|
| File size: 302 bytes | |
| Rev | Line | |
|---|---|---|
| [36a61f3] | 1 | // one dimension array computation |
| 2 | // with finer granularity than traditional 4 bytes. | |
| 3 | // Dynamic tools looking at 4-bytes elements may wrongfuly report race condition. | |
| 4 | // | |
| 5 | // Liao 2/7/2017 | |
| 6 | int i; | |
| 7 | char a[100]; | |
| 8 | int main() | |
| 9 | { | |
| 10 | #pragma omp parallel for | |
| 11 | for (i=0;i<100;i++) | |
| 12 | a[i]=a[i]+1; | |
| 13 | return 0; | |
| 14 | } |
Note:
See TracBrowser
for help on using the repository browser.
