main
test-branch
|
Last change
on this file since 397ae5f 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
100644
|
|
File size:
246 bytes
|
| Line | |
|---|
| 1 | #include <civlc.cvh>
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 | int main () {
|
|---|
| 5 | int x[4] = {1, 2, 3, 4};
|
|---|
| 6 | int y = -1;
|
|---|
| 7 |
|
|---|
| 8 | #pragma omp parallel sections firstprivate(y) shared(x)
|
|---|
| 9 | {
|
|---|
| 10 | {
|
|---|
| 11 | x[0] = x[1];
|
|---|
| 12 | }
|
|---|
| 13 | #pragma omp section
|
|---|
| 14 | {
|
|---|
| 15 | x[2] = x[3];
|
|---|
| 16 | }
|
|---|
| 17 | #pragma omp section
|
|---|
| 18 | {
|
|---|
| 19 | y = x[2];
|
|---|
| 20 | }
|
|---|
| 21 | }
|
|---|
| 22 | return 0;
|
|---|
| 23 | } |
|---|
Note:
See
TracBrowser
for help on using the repository browser.