mirror of
https://github.com/OpenMP/Examples.git
synced 2025-04-07 23:22:11 +01:00
28 lines
357 B
C
28 lines
357 B
C
/*
|
|
* @@name: standalone.2c
|
|
* @@type: C
|
|
* @@compilable: yes
|
|
* @@linkable: no
|
|
* @@expect: success
|
|
*/
|
|
void standalone_ok()
|
|
{
|
|
int a = 1;
|
|
|
|
#pragma omp parallel
|
|
{
|
|
if (a != 0) {
|
|
#pragma omp flush(a)
|
|
}
|
|
if (a != 0) {
|
|
#pragma omp barrier
|
|
}
|
|
if (a != 0) {
|
|
#pragma omp taskwait
|
|
}
|
|
if (a != 0) {
|
|
#pragma omp taskyield
|
|
}
|
|
}
|
|
}
|