Adding custom function to backend kernels

Hi,

I would like to know how can I add a function on the backend. I tried with different syntax involving __global__ __host__ __device__ but none of them worked.
I was tried to implement a function within a BC mako kernel.

Where can I put such a function if this is something which is possible to accomplish?

Thanks a lot,

Best regards

When you say you want to add a function on the backend, do you mean that you want to add a function that is called within a kernel?

Have you tried just using a mako macro? This is straightforward to implement in pyfr and it is worth understanding the performance of that option before trying something more complicated.