<DO CONCURRENT Example Program>
Program concurrent_example
Logical :: m(20)
m = .True.
Call test( m, [ 2,3,5,7,11,13,17,19 ] )
Contains
Subroutine test(pattern,list)
Logical,Intent(InOut) :: pattern(:)
Integer,Intent(In) :: list(:)
! "list" has no repeated elements, so we can do this safely.
Do Concurrent (i=1:Size(list))
pattern(list(i)) = .False.
End Do
Print *,pattern
End Subroutine
End Program
■ Execution Results
T F F T F T F T T T F T F T T T F T F T