Neko 1.99.10
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
ax_helm_compr_kernel.h File Reference
#include "elem_block.h"
#include "mfma_kernel.h"
Include dependency graph for ax_helm_compr_kernel.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ax_helm_compr_mfma_dispatch< T, LX, NWF, TILE >
struct  ax_helm_compr_mfma_vector_dispatch< T, LX, NWF, TILE >

Functions

template<typename T, const int LX, const int CHUNKS>
__global__ void ax_helm_compr_kernel_1d (T *__restrict__ w, const T *__restrict__ u, const T *__restrict__ dx, const T *__restrict__ dy, const T *__restrict__ dz, const T *__restrict__ dxt, const T *__restrict__ dyt, const T *__restrict__ dzt, const T *__restrict__ h1, const T *__restrict__ g11, const T *__restrict__ g22, const T *__restrict__ g33, const T *__restrict__ g12, const T *__restrict__ g13, const T *__restrict__ g23, const int *__restrict__ ind)
template<typename T, const int LX, const int EB>
__global__ void __launch_bounds__ ((LX *LX *EB)) ax_helm_compr_kernel_kstep(T *__restrict__ w
 if (eb==0)
 for (int k=0;k< LX;++k)
 __syncthreads ()
 if (active)
template<typename T, const int LX, const int NWF, const int TILE>
__global__ void __launch_bounds__ (64 *NWF) ax_helm_compr_kernel_mfma(T *__restrict__ w

Variables

__global__ void const T *__restrict__ u
__global__ void const T *__restrict__ const T *__restrict__ dx
__global__ void const T *__restrict__ const T *__restrict__ const T *__restrict__ dy
__global__ void const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ dz
__global__ void const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ h1
__global__ void const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ g11
__global__ void const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ g22
__global__ void const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ g33
__global__ void const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ g12
__global__ void const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ g13
__global__ void const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ g23
__global__ void const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const int *__restrict__ ind
__global__ void const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const int *__restrict__ const int nelv
__shared__ T shdy [LX *LX]
__shared__ T shdz [LX *LX]
__shared__ T shu [EB *LX *LX]
__shared__ T shur [EB *LX *LX]
__shared__ T shus [EB *LX *LX]
T ru [LX]
T rw [LX]
T rut
const int eb = (EB == 1) ? 0 : threadIdx.z
const int e_blk = blockIdx.x * EB + eb
const bool active = (EB == 1) ? true : (e_blk < nelv)
const int e = active ? e_blk : (nelv - 1)
const int j = threadIdx.y
const int i = threadIdx.x
const int ij = i + j*LX
const int sh = eb*LX*LX
const int ele = e*LX*LX*LX
const int gele = (ind[e] - 1)*LX*LX*LX
const int ij_p = i + j*(LX+1)
const int sh_p = eb*LX*(LX+1)
__global__ void T *__restrict__ av
__global__ void T *__restrict__ T *__restrict__ aw
__global__ void T *__restrict__ T *__restrict__ const T *__restrict__ const T *__restrict__ v
__global__ void T *__restrict__ T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ w
__shared__ T shv [EB *LX *LX]
__shared__ T shvr [EB *LX *LX]
__shared__ T shvs [EB *LX *LX]
__shared__ T shw [EB *LX *LX]
__shared__ T shwr [EB *LX *LX]
__shared__ T shws [EB *LX *LX]
T rv [LX]
T ruw [LX]
T rvw [LX]
T rww [LX]
T rvt
T rwt

Function Documentation

◆ __launch_bounds__() [1/2]

template<typename T, const int LX, const int EB>
__global__ void __launch_bounds__ ( (LX *LX *EB) )

Device kernel for axhelm with padding in shared memory to remove bank conflicts when LX is a power of 2

◆ __launch_bounds__() [2/2]

template<typename T, const int LX, const int NWF, const int TILE>
__global__ void __launch_bounds__ ( 64 * NWF)
Here is the call graph for this function:

◆ __syncthreads()

__syncthreads ( )

◆ ax_helm_compr_kernel_1d()

template<typename T, const int LX, const int CHUNKS>
__global__ void ax_helm_compr_kernel_1d ( T *__restrict__ w,
const T *__restrict__ u,
const T *__restrict__ dx,
const T *__restrict__ dy,
const T *__restrict__ dz,
const T *__restrict__ dxt,
const T *__restrict__ dyt,
const T *__restrict__ dzt,
const T *__restrict__ h1,
const T *__restrict__ g11,
const T *__restrict__ g22,
const T *__restrict__ g33,
const T *__restrict__ g12,
const T *__restrict__ g13,
const T *__restrict__ g23,
const int *__restrict__ ind )

Device kernels for Ax helm on compressed geometric factors

Derived mechanically from ax_helm_kernel.h, and a change to one belongs in the other. Every strategy there is here – 1d at every chunk candidate, kstep and kstep_padded at every elements per block candidate, the matrix core kernels at every wavefront and tile candidate, scalar and vector – with one difference: element e reads its geometric factors g11..g23 from copy ind[e] - 1, ind holding the 1-based copy indices of coef_t::compression_inds. u, h1 and the outputs stay indexed by e, and in the blocked and matrix core kernels each element of the block looks up its own copy.

Definition at line 56 of file ax_helm_compr_kernel.h.

Here is the call graph for this function:

◆ for()

for ( )

Definition at line 229 of file ax_helm_compr_kernel.h.

◆ if() [1/2]

if ( active )

Definition at line 285 of file ax_helm_compr_kernel.h.

◆ if() [2/2]

if ( eb = = 0)

Definition at line 222 of file ax_helm_compr_kernel.h.

Variable Documentation

◆ active

const bool active = (EB == 1) ? true : (e_blk < nelv)

Definition at line 212 of file ax_helm_compr_kernel.h.

◆ av

__global__ void T* __restrict__ av

Definition at line 793 of file ax_helm_compr_kernel.h.

◆ aw

__global__ void T* __restrict__ T* __restrict__ aw

Definition at line 794 of file ax_helm_compr_kernel.h.

◆ dx

__global__ void T* __restrict__ T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ dx

Definition at line 169 of file ax_helm_compr_kernel.h.

◆ dy

__global__ void T* __restrict__ T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ dy

Definition at line 170 of file ax_helm_compr_kernel.h.

◆ dz

__global__ void T* __restrict__ T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ dz

Definition at line 171 of file ax_helm_compr_kernel.h.

◆ e

const int e = active ? e_blk : (nelv - 1)

Definition at line 213 of file ax_helm_compr_kernel.h.

◆ e_blk

const int e_blk = blockIdx.x * EB + eb

Definition at line 211 of file ax_helm_compr_kernel.h.

◆ eb

const int eb = (EB == 1) ? 0 : threadIdx.z

Definition at line 210 of file ax_helm_compr_kernel.h.

◆ ele

const int ele = e*LX*LX*LX

Definition at line 218 of file ax_helm_compr_kernel.h.

◆ g11

__global__ void T* __restrict__ T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ g11

Definition at line 173 of file ax_helm_compr_kernel.h.

◆ g12

__global__ void T* __restrict__ T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ g12

Definition at line 176 of file ax_helm_compr_kernel.h.

◆ g13

__global__ void T* __restrict__ T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ g13

Definition at line 177 of file ax_helm_compr_kernel.h.

◆ g22

__global__ void T* __restrict__ T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ g22

Definition at line 174 of file ax_helm_compr_kernel.h.

◆ g23

__global__ void T* __restrict__ T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ g23

Definition at line 178 of file ax_helm_compr_kernel.h.

◆ g33

__global__ void T* __restrict__ T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ g33

Definition at line 175 of file ax_helm_compr_kernel.h.

◆ gele

const int gele = (ind[e] - 1)*LX*LX*LX

Definition at line 220 of file ax_helm_compr_kernel.h.

◆ h1

__global__ void T* __restrict__ T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ h1

Definition at line 172 of file ax_helm_compr_kernel.h.

◆ i

const int i = threadIdx.x

Definition at line 215 of file ax_helm_compr_kernel.h.

◆ ij

const int ij = i + j*LX

Definition at line 216 of file ax_helm_compr_kernel.h.

◆ ij_p

const int ij_p = i + j*(LX+1)

Definition at line 347 of file ax_helm_compr_kernel.h.

◆ ind

__global__ void T* __restrict__ T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const int* __restrict__ ind

Definition at line 179 of file ax_helm_compr_kernel.h.

◆ j

const int j = threadIdx.y

Definition at line 214 of file ax_helm_compr_kernel.h.

◆ nelv

__global__ void T* __restrict__ T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const int* __restrict__ const int nelv
Initial value:
{
__shared__ T shdx[LX * LX]
shdx[ij]

Definition at line 180 of file ax_helm_compr_kernel.h.

◆ ru

T ru[LX]

Definition at line 201 of file ax_helm_compr_kernel.h.

◆ rut

T rut

Definition at line 203 of file ax_helm_compr_kernel.h.

◆ ruw

T ruw[LX]

Definition at line 848 of file ax_helm_compr_kernel.h.

◆ rv

T rv[LX]

Definition at line 845 of file ax_helm_compr_kernel.h.

◆ rvt

T rvt

Definition at line 853 of file ax_helm_compr_kernel.h.

◆ rvw

T rvw[LX]

Definition at line 849 of file ax_helm_compr_kernel.h.

◆ rw

T rw[LX]

Definition at line 202 of file ax_helm_compr_kernel.h.

◆ rwt

T rwt

Definition at line 854 of file ax_helm_compr_kernel.h.

◆ rww

T rww[LX]

Definition at line 850 of file ax_helm_compr_kernel.h.

◆ sh

const int sh = eb*LX*LX

Definition at line 217 of file ax_helm_compr_kernel.h.

◆ sh_p

const int sh_p = eb*LX*(LX+1)

Definition at line 349 of file ax_helm_compr_kernel.h.

◆ shdy

__shared__ T shdy[LX *(LX+1)]

Definition at line 184 of file ax_helm_compr_kernel.h.

◆ shdz

__shared__ T shdz[LX *(LX+1)]

Definition at line 185 of file ax_helm_compr_kernel.h.

◆ shu

__shared__ T shu[EB *LX *(LX+1)]

Definition at line 188 of file ax_helm_compr_kernel.h.

◆ shur

__shared__ T shur[EB *LX *LX]

Definition at line 189 of file ax_helm_compr_kernel.h.

◆ shus

__shared__ T shus[EB *LX *(LX+1)]

Definition at line 190 of file ax_helm_compr_kernel.h.

◆ shv

__shared__ T shv[EB *LX *(LX+1)]

Definition at line 821 of file ax_helm_compr_kernel.h.

◆ shvr

__shared__ T shvr[EB *LX *LX]

Definition at line 822 of file ax_helm_compr_kernel.h.

◆ shvs

__shared__ T shvs[EB *LX *(LX+1)]

Definition at line 823 of file ax_helm_compr_kernel.h.

◆ shw

__shared__ T shw[EB *LX *(LX+1)]

Definition at line 825 of file ax_helm_compr_kernel.h.

◆ shwr

__shared__ T shwr[EB *LX *LX]

Definition at line 826 of file ax_helm_compr_kernel.h.

◆ shws

__shared__ T shws[EB *LX *(LX+1)]

Definition at line 827 of file ax_helm_compr_kernel.h.

◆ u

__global__ void T* __restrict__ T* __restrict__ const T* __restrict__ u

Definition at line 168 of file ax_helm_compr_kernel.h.

◆ v

__global__ void T* __restrict__ T* __restrict__ const T* __restrict__ const T* __restrict__ v

Definition at line 796 of file ax_helm_compr_kernel.h.

◆ w

__global__ void T* __restrict__ T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ w

Definition at line 797 of file ax_helm_compr_kernel.h.