How to transform Mako template into c- or cuda-type?

Dear all,

In the publication of PyFR (PyFR: An open source framework for solving advection–diffusion type problems on streaming architectures using the flux reconstruction approach), the idea of Mako is very interesting that extends a small piece of code into c- or cuda-type. I would like to ask about which python file in PyFR controls the transformation? and how to find the generated CUDA source/OpenMP annotated C source related to corresponding Mako template?

Regards
Kiny

The translation is mostly done in the various subclasses of
BaseKernelGenerator in:

<PyFR/generator.py at develop · PyFR/PyFR · GitHub>

Some of the Mako related functions are inside makoutil:

<PyFR/makoutil.py at develop · PyFR/PyFR · GitHub>

If you want to see what the generated code looks like you can put a
print statement around:

<PyFR/kernels.py at develop · PyFR/PyFR · GitHub>

Regards, Freddie.

Hi Freddie, thank you.