loki.transformations.transpile.fortran_c
Classes
|
Transformation to apply/insert Dereference = * and Reference/address-of = & operators. |
|
Fortran-to-C transformation that translates the given routine into C. |
- class FortranCTransformation(inline_elementals=True, language='c')
Bases:
Transformation
Fortran-to-C transformation that translates the given routine into C.
- Parameters:
- file_suffix()
- transform_subroutine(routine, **kwargs)
Defines the transformation to apply to
Subroutine
items.For transformations that modify
Subroutine
objects, 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.
- convert_kwargs_to_args(routine, targets)
- interface_to_import(routine, targets)
Convert interface to import.
- static apply_de_reference(routine)
Utility method to apply/insert Dereference = * and Reference/address-of = & operators.
- generate_c_kernel(routine, targets, **kwargs)
Re-generate the C kernel and insert wrapper-specific peculiarities, such as the explicit getter calls for imported module-level variables.
- convert_call_names(routine, targets)
- generate_c_kernel_launch(kernel_launch, kernel, **kwargs)