You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure this proposal doesn't already exist, but I can't find it. If it exists, feel free to delete this issue.
It would good to allow for the simple do loop the same syntax as the do concurrent loop, not only for internal consistency of the language, but mainly to allow the on-the-fly declaration of the index:
do (integer:: i =1:n)
...
end do
For an even better consistency, the sequential keyword could be used:
do sequential (integer:: i =1:n)
...
end do
What I am also wondering is if the typing could be implicit... After all, the index is necessarily of the integer type, so there's no need to specify it as long as one just need the default kind:
do sequential (i =1:n)
! is equivalent todo sequential (integer:: i =1:n)
Specifying the type/kind would be requiring only for the non default kinds:
do sequential (integer(kind=int64) :: i =1:n)
This would mean that the scope of the index would always be limited to the loop, which is a good thing IMO.
This "implicit typing rule" could be extended to the do concurrent statement, as I can't see how it would break anything.
The text was updated successfully, but these errors were encountered:
PierUgit
changed the title
Makind DO loop syntax consitent with the DO CONCURRENT one
Makind DO loop syntax consistent with the DO CONCURRENT one
Sep 22, 2024
PierUgit
changed the title
Makind DO loop syntax consistent with the DO CONCURRENT one
Making DO loop syntax consistent with the DO CONCURRENT one
Sep 22, 2024
Yes, I know I've seen this exact proposal before, but can't find it right now so we'll leave this open. Yes, going from serial do to concurrent do requires changing the syntax, which is very annoying.
I'm not sure this proposal doesn't already exist, but I can't find it. If it exists, feel free to delete this issue.
It would good to allow for the simple do loop the same syntax as the do concurrent loop, not only for internal consistency of the language, but mainly to allow the on-the-fly declaration of the index:
For an even better consistency, the
sequential
keyword could be used:What I am also wondering is if the typing could be implicit... After all, the index is necessarily of the
integer
type, so there's no need to specify it as long as one just need the default kind:Specifying the type/kind would be requiring only for the non default kinds:
This would mean that the scope of the index would always be limited to the loop, which is a good thing IMO.
This "implicit typing rule" could be extended to the
do concurrent
statement, as I can't see how it would break anything.The text was updated successfully, but these errors were encountered: