In case it helps anyone to see how significant the reduction in
complexity can be with support for locality specifiers, we have
Fortran 2008, 2018, and 2023 versions of the "do concurrent" construct
that lies at the heart of our neural-network training code here:

https://github.com/BerkeleyLab/fiats/blob/25457d8e390f59f3191d6fcd0d5a609f173059d6/src/fiats/neural_network_s.F90#L899

The 2023 version has one do concurrent statement that we expand into 7
statements if we have to fall back to 2018 (including the "end block"
that is much lower in the code) without reduce locality and expands to
10 statements if we have to fall all the way back to 2008 without
local or reduce.  Although there's a minor win associated with
supporting local, there's a much bigger reduction in code complexity
that comes with supporting both local and reduce.

Damian

Reply via email to