1
0
mirror of https://github.com/OpenMP/Examples.git synced 2025-04-14 02:11:25 +01:00
2022-11-04 09:35:42 -07:00

18 lines
309 B
C

/*
* @@name: copyprivate.1
* @@type: C
* @@operation: compile
* @@expect: success
* @@version: pre_omp_3.0
*/
#include <stdio.h>
float x, y;
#pragma omp threadprivate(x, y)
void init(float a, float b ) {
#pragma omp single copyprivate(a,b,x,y)
{
scanf("%f %f %f %f", &a, &b, &x, &y);
}
}