.. _interface_TKE: TKE === Inside the library, the Fortran derived data types are rebuilt as lightweight structures. This is done to improve the code readability and to simplify the interface to the library backend. For example, internally the library defines a `t_patch` structures as follows:: struct t_patch { double *depth_CellInterface; double *prism_center_dist_c; double *inv_prism_center_dist_c; double *prism_thick_c; int *dolic_c; int *dolic_e; double *zlev_i; double *wet_c; int *edges_cell_idx; int *edges_cell_blk; }; which is a lightweight version of the ICON version. This structures are filled inside the `TKE` class during the first time step. Then, these structures are provided to the backend. The backend is internally using a memory view on the allocated memory. The interface allows to use different memory views implementations for different backends (CPU, CUDA or HIP) and to easily change to a different memory view implementation from an existing one. For example, the CUDA backend uses the `mdspan` from the CUDA standard library which can generate a 1D, 2D or 3D view based on a provided memory allocation and it allows to use the allocated contiguous one dimensional memory as Fortran arrays. The memory view objects are created during the first time step based on the pointers provided by the model and they are organized in structures of memory views. These structures are then used in the computations. In order to achieve enough flexibility in the interface, the structures of memory views are templated. For example a structure of memory views mirroring the `t_patch` struct:: template