2022-11-04 09:35:42 -07:00

20 lines
367 B
C

/*
* @@name: SIMD.5
* @@type: C
* @@operation: compile
* @@expect: success
* @@version: omp_4.0
*/
void work( double **a, double **b, double **c, int n )
{
int i, j;
double tmp;
#pragma omp for simd collapse(2) private(tmp)
for (i = 0; i < n; i++) {
for (j = 0; j < n; j++) {
tmp = a[i][j] + b[i][j];
c[i][j] = tmp;
}
}
}