copyprivate Clause
Specifies that the value of a variable or list of variables acquired by one thread is shared with all other threads.
Format
copyprivate (list)
Example
#ifdef _OPENMP
#include <omp.h>
#endif
#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);
}
}