main
|
Last change
on this file was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago |
|
Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.
git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5704 fb995dde-84ed-4084-dfe6-e5aef3e2452c
|
-
Property mode
set to
100755
|
|
File size:
950 bytes
|
| Rev | Line | |
|---|
| [e3f356c] | 1 | /*
|
|---|
| 2 | !!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!!!
|
|---|
| 3 | !!! Copyright (c) 2017-20, Lawrence Livermore National Security, LLC
|
|---|
| 4 | !!! and DataRaceBench project contributors. See the DataRaceBench/COPYRIGHT file for details.
|
|---|
| 5 | !!!
|
|---|
| 6 | !!! SPDX-License-Identifier: (BSD-3-Clause)
|
|---|
| 7 | !!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!!!
|
|---|
| 8 | */
|
|---|
| 9 |
|
|---|
| 10 | /* This kernel imitates the nature of a program from the NAS Parallel Benchmarks 3.0 MG suit.
|
|---|
| 11 | * Use of private clause at 26:28 will ensure that there is no data race. No Data Race Pairs.
|
|---|
| 12 | */
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 | #include <stdio.h>
|
|---|
| 16 | #include <omp.h>
|
|---|
| 17 |
|
|---|
| 18 | int main(){
|
|---|
| 19 | int i,j,k,m;
|
|---|
| 20 | double tmp1;
|
|---|
| 21 |
|
|---|
| 22 | double a[12][12][12];
|
|---|
| 23 |
|
|---|
| 24 | m = 3.0;
|
|---|
| 25 |
|
|---|
| 26 | #pragma omp parallel for private(j,k,tmp1)
|
|---|
| 27 | for (i = 0; i < 12; i++) {
|
|---|
| 28 | for (j = 0; j < 12; j++) {
|
|---|
| 29 | for (k = 0; k < 12; k++) {
|
|---|
| 30 | tmp1 = 6.0/m;
|
|---|
| 31 | a[i][j][k] = tmp1+4;
|
|---|
| 32 | }
|
|---|
| 33 | }
|
|---|
| 34 | }
|
|---|
| 35 |
|
|---|
| 36 | return 0;
|
|---|
| 37 | }
|
|---|
| 38 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.