mirror of
https://github.com/OpenMP/Examples.git
synced 2025-04-07 23:22:11 +01:00
14 lines
333 B
Fortran
14 lines
333 B
Fortran
! @@name: threadprivate.1f
|
|
! @@type: F-fixed
|
|
! @@compilable: yes
|
|
! @@linkable: no
|
|
! @@expect: success
|
|
INTEGER FUNCTION INCREMENT_COUNTER()
|
|
COMMON/INC_COMMON/COUNTER
|
|
!$OMP THREADPRIVATE(/INC_COMMON/)
|
|
|
|
COUNTER = COUNTER +1
|
|
INCREMENT_COUNTER = COUNTER
|
|
RETURN
|
|
END FUNCTION INCREMENT_COUNTER
|