TKE_gpu class

class TKE_gpu : public TKE_backend
#include <TKE_gpu.hpp>

TKE GPU backend class, derived from TKE_backend.

Public Functions

TKE_gpu(int nproma, int nlevs, int nblocks, int vert_mix_type, int vmix_idemix_tke, int vert_cor_type, double dtime, double OceanReferenceDensity, double grav, int l_lc, double clc, double ReferencePressureIndbars, double pi)

TKE_gpu class constructor.

It calls the TKE_backend constructor and the internal_fields_malloc method with specific memory view and policy.

~TKE_gpu()

TKE_gpu class destructor.

It calls internal_fields_free with specific memory view policy.

Protected Functions

virtual void calc_impl(struct t_patch p_patch, struct t_cvmix p_cvmix, struct t_ocean_state ocean_state, struct t_atmo_fluxes atmos_fluxes, struct t_atmos_for_ocean p_as, struct t_sea_ice p_sea_ice, int edges_block_size, int edges_start_block, int edges_end_block, int edges_start_index, int edges_end_index, int cells_block_size, int cells_start_block, int cells_end_block, int cells_start_index, int cells_end_index)

GPU implementation of TKE.

It fills the memory view structures during the first call and then compute the turbulent kinetic energy vertical scheme.

template<class launch_policy>
inline void launch_kernel(int threadsPerBlock, int blocksPerGrid, void *func, void **args)

Function to launch the kernel.

It is templated with the launch policy and calls the launch function of the launch_policy class.