/* * @@name: copyin.1c * @@type: C * @@compilable: yes * @@linkable: no * @@expect: success */ #include float* work; int size; float tol; #pragma omp threadprivate(work,size,tol) void build() { int i; work = (float*)malloc( sizeof(float)*size ); for( i = 0; i < size; ++i ) work[i] = tol; } void copyin_example( float t, int n ) { tol = t; size = n; #pragma omp parallel copyin(tol,size) { build(); } }