New transformation to replace a single-trip loop with an assignment to the loop variable #2738
Labels
enhancement
good first issue
An issue that is probably suitable for a new PSyclone developer
NG-ARCH
Issues relevant to the GPU parallelisation of LFRic and other models expected to be used in NG-ARCH
Given the reshaping of arrays being passed into the UM physics routines, there are many cases where there are loops over a dimension that we know, at build time, will have an extent of just unity. To help the compiler, it would therefore be good to remove all such loops and simply replace them with an assignment to the loop variable followed by the body of the loop:
Since this isn't entirely trivial, it would be good to have this as a transformation. I'm not sure what it should be called though. Perhaps
ReplaceSingleTripLoopTrans
?The text was updated successfully, but these errors were encountered: