Purpose:
Format:
| Fortran | PRIVATE (list) |
|---|---|
| C/C++ | private (list) |
Notes:
| PRIVATE | THREADPRIVATE | |
|---|---|---|
| Data Item | C/C++: variable Fortran: variable or common block |
C/C++: variable Fortran: common block |
| Where Declared | At start of region or work-sharing group | In declarations of each routine using block or global file scope |
| Persistent? | No | Yes |
| Extent | Lexical only - unless passed as an argument to subroutine | Dynamic |
| Initialized | Use FIRSTPRIVATE | Use COPYIN |
Questions:
| For the C/C++ and Fortran
THREADPRIVATE example codes, what output would you expect
for alpha[3] and beta[3]? Why?
|