/* * @@name: reduction.1c * @@type: C * @@compilable: yes * @@linkable: no * @@expect: success */ #include void reduction1(float *x, int *y, int n) { int i, b, c; float a, d; a = 0.0; b = 0; c = y[0]; d = x[0]; #pragma omp parallel for private(i) shared(x, y, n) \ reduction(+:a) reduction(^:b) \ reduction(min:c) reduction(max:d) for (i=0; i y[i]) c = y[i]; d = fmaxf(d,x[i]); } }