loki.transformations.transpile.fortran_python
Classes
|
A transformer class to convert Fortran to Python or DaCe. |
- class FortranPythonTransformation(**kwargs)
Bases:
TransformationA transformer class to convert Fortran to Python or DaCe.
This
Transformationwill generate Python code from a given Fortran routine, and if configured, annotate it with DaCe dataflow pragmas.- Parameters:
with_dace (bool) – Generate DaCe-specific Python code via
dacegenbackend. This option implies inverted array indexing; default:Falseinvert_indices (bool) – Switch to C-style indexing (row-major) with fastest loop indices being used rightmost; default:
Falsesuffix (str) – Optional suffix to append to converted routine names.
- transform_subroutine(routine, **kwargs)
Defines the transformation to apply to
Subroutineitems.For transformations that modify
Subroutineobjects, this method should be implemented. It gets called via the dispatch methodapply().- Parameters:
routine (
Subroutine) – The subroutine to be transformed.**kwargs (optional) – Keyword arguments for the transformation.