Example A.37.1c

The public comment period closed January 31, 2008. This forum is now locked (read only).

Example A.37.1c

Postby bda » Wed Jan 30, 2008 3:19 am

Example A.37.1c makes no sense with respect to the usage of the two variables a and b. Either a comment should be added, that a and b only have values when used inside init(), or we need a different example, e.g.
Code: Select all
void init(int *a, int *b) {

    int r_a, r_b;

#pragma omp single copyprivate(x, y)
{
    scanf("%d %d %d %d", &r_a, &r_b, &x, &y);
} /* end of omp single */
   
    *a = r_a;
    *b = r_b;
}


The Fortran example is ok, since a and b can be assigned new values within init() and those values can be seen by the calling function.
bda
 
Posts: 2
Joined: Wed Nov 07, 2007 12:48 pm

Return to Draft 3.0 Public Comment

Who is online

Users browsing this forum: No registered users and 0 guests