stfc / PSyclone

Domain-specific compiler and code transformation system for Finite Difference/Volume/Element Earth-system models in Fortran
BSD 3-Clause "New" or "Revised" License
107 stars 28 forks source link

Code duplication in psydata #1382

Open hiker opened 3 years ago

hiker commented 3 years ago

When implementing #1288 , some functionality (automatically created unique region names) was moved from the Extract node into the transformation. But other transformations (at least profile) still need the same code in the node, not in the transformation, which results in code duplication (I tried to use a common function in the node and transformation, but the tree is in a different state - once before the extract node is inserted, and once where the 'upper' part of the tree has been lowered, making this very hacky).

The special setup in the psydata nodes should consistently be moved into the transformation. Known issues:

hiker commented 1 year ago
hiker commented 6 months ago

I cover the common base class for driver creation in #2049.