mirror of
https://github.com/OpenMP/Examples.git
synced 2025-04-10 08:22:11 +01:00
16 lines
276 B
C
16 lines
276 B
C
/*
|
|
* @@name: ploop.1
|
|
* @@type: C
|
|
* @@operation: compile
|
|
* @@expect: success
|
|
* @@version: pre_omp_3.0
|
|
*/
|
|
void simple(int n, float *a, float *b)
|
|
{
|
|
int i;
|
|
|
|
#pragma omp parallel for
|
|
for (i=1; i<n; i++) /* i is private by default */
|
|
b[i] = (a[i] + a[i-1]) / 2.0;
|
|
}
|