OpenMP-Examples/sources/Example_threadprivate.1f.f
2015-01-13 11:38:24 -08:00

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