/* * @@name: SIMD.3c * @@type: C * @@compilable: yes * @@linkable: no * @@expect: success */ double work( double *a, double *b, int n ) { int i; double tmp, sum; sum = 0.0; #pragma omp simd private(tmp) reduction(+:sum) for (i = 0; i < n; i++) { tmp = a[i] + b[i]; sum += tmp; } return sum; }