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:
985 bytes
|
| Line | |
|---|
| 1 | !!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!!!
|
|---|
| 2 | !!! Copyright (c) 2017-20, Lawrence Livermore National Security, LLC
|
|---|
| 3 | !!! and DataRaceBench project contributors. See the DataRaceBench/COPYRIGHT file for details.
|
|---|
| 4 | !!!
|
|---|
| 5 | !!! SPDX-License-Identifier: (BSD-3-Clause)
|
|---|
| 6 | !!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!!!
|
|---|
| 7 |
|
|---|
| 8 | !Example with loop-carried data dependence at the outer level loop.
|
|---|
| 9 | !The inner level loop can be parallelized. No data race pairs.
|
|---|
| 10 |
|
|---|
| 11 | program DRB054_inneronly2_orig_no
|
|---|
| 12 | use omp_lib
|
|---|
| 13 | implicit none
|
|---|
| 14 |
|
|---|
| 15 | integer i,j,n,m
|
|---|
| 16 | real, dimension(:,:), allocatable :: b
|
|---|
| 17 |
|
|---|
| 18 | n = 100
|
|---|
| 19 | m = 100
|
|---|
| 20 |
|
|---|
| 21 | allocate (b(n,m))
|
|---|
| 22 |
|
|---|
| 23 | do i = 1, n
|
|---|
| 24 | do j = 1, m
|
|---|
| 25 | b(i,j) = i*j
|
|---|
| 26 | end do
|
|---|
| 27 | end do
|
|---|
| 28 |
|
|---|
| 29 | do i = 2, n
|
|---|
| 30 | !$omp parallel do
|
|---|
| 31 | do j =2, m
|
|---|
| 32 | b(i,j)=b(i-1,j-1)
|
|---|
| 33 | end do
|
|---|
| 34 | !$omp end parallel do
|
|---|
| 35 | end do
|
|---|
| 36 |
|
|---|
| 37 | deallocate(b)
|
|---|
| 38 | end program
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.