Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backend: Improved specialisation via "style classes" #519

Open
6 tasks
mlange05 opened this issue Mar 27, 2025 · 0 comments
Open
6 tasks

Backend: Improved specialisation via "style classes" #519

mlange05 opened this issue Mar 27, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@mlange05
Copy link
Collaborator

Is your feature request related to a problem? Please describe.

The various Loki backends still generate a highly custom code layout that portrays several of the assumption dictated by the internal IR representation. The recent introduction of "style" classes (PR #517 ) makes some of the easier features configurable, but is still very limited in its current form. This issue is intended to track and discuss various ideas for improvements to make the backends more configurable in the future.

As always, this is only an initial list and additional ideas and features should be added as they arise.

Describe the solution you'd like

  • General: Addition of CStyle and PythonStyle, as well as specialisations
  • General: Unify language specialisations (eg. fgen/cufgen, cgen/cppgen/cudagen, pygen/dacegen) and expose specialised flavours as inherited styles (eg. cgen(ir, style=CUDAStyle(), ...))
  • Fortran: Up/down-casing of keywords (possibly default and specific ones)
  • Fortran: Preserve line comments in multi-line call/procedure signatures
  • Fortran: Configurable formatting of multiline, many-argument call signatures
  • Fortran: Block alignment options of declarations (eg. align ::) or assignments (align =).

Describe alternatives you've considered

No response

Additional context

No response

Organisation

ECMWF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant