this example illustrate the use of lastprivate


This example illustrate the use of lastprivate clause void for_loop (int n, float *a, float *b)

{

int i;

#pragma omp parallel

{

#pragma omp for lastprivate(i)

for (i=0; i

a[i] = b[i] + b[i+1];

}

a[i]=b[i];  /* i == n-1 here */

}

Request for Solution File

Ask an Expert for Answer!!
Computer Networking: this example illustrate the use of lastprivate
Reference No:- TGS0208324

Expected delivery within 24 Hours