Neko 1.99.11
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
ax_helm_svv_factorized_kernel.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<typename T, const int LX, const bool PAD>
__global__ void __launch_bounds__ (LX *LX) ax_helm_svv_factorized_kernel(T *__restrict__ w
 for (int k=0;k< LX;++k)
 __syncthreads ()

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__ br
__global__ void const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ bs
__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__ bt
__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__ h1_svv
__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__ g11
__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__ 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__ 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__ 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__ 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__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ g23
__shared__ T shdx [LX *P] = dx[ij]
__shared__ T shdy [LX *P] = dy[ij]
__shared__ T shdz [LX *P] = dz[ij]
__shared__ T shbr [LX *P] = br[ij]
__shared__ T shbs [LX *P] = bs[ij]
__shared__ T shbt [LX *P] = bt[ij]
__shared__ T shu [LX *P]
__shared__ T shur [LX *LX]
__shared__ T shus [LX *P]
__shared__ T shur_svv [LX *LX]
__shared__ T shus_svv [LX *P]
T ru [LX]
T rw [LX]
T rut
T rut_svv
const int e = blockIdx.x
const int j = threadIdx.y
const int i = threadIdx.x
const int ij = i + j*LX
const int ij_p = i + j*P
const int ele = e*LX*LX*LX

Function Documentation

◆ __launch_bounds__()

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

Fused device kernel for the factorized SVV Helmholtz operator

Evaluates, in a single pass over each element, w = D^T (h1 G) D u + B^T (h1_svv G) B u, with B = (Br, Bs, Bt) the complementary (filtered) derivative matrices. This mirrors ax_helm_svv_factorized_lx in the CPU backend: both contractions share the k-plane sweep, the geometric factors are loaded once, and w is stored once (no read-modify-write of the output).

The kernel is kept separate from the autotuned ax_helm kernels on purpose, so that those keep their register footprint untouched.

PAD selects a shared memory pitch of LX+1, removing bank conflicts when LX is a power of two.

◆ __syncthreads()

__syncthreads ( )

◆ for()

for ( )

Definition at line 107 of file ax_helm_svv_factorized_kernel.h.

Variable Documentation

◆ br

__global__ void const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ br

Definition at line 61 of file ax_helm_svv_factorized_kernel.h.

◆ bs

__global__ void const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ bs

Definition at line 62 of file ax_helm_svv_factorized_kernel.h.

◆ bt

__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__ bt

Definition at line 63 of file ax_helm_svv_factorized_kernel.h.

◆ dx

__global__ void const T* __restrict__ const T* __restrict__ dx

Definition at line 57 of file ax_helm_svv_factorized_kernel.h.

◆ dy

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

Definition at line 58 of file ax_helm_svv_factorized_kernel.h.

◆ dz

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

Definition at line 59 of file ax_helm_svv_factorized_kernel.h.

◆ e

const int e = blockIdx.x

Definition at line 92 of file ax_helm_svv_factorized_kernel.h.

◆ ele

const int ele = e*LX*LX*LX

Definition at line 97 of file ax_helm_svv_factorized_kernel.h.

◆ g11

__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__ g11

Definition at line 65 of file ax_helm_svv_factorized_kernel.h.

◆ 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__ const T* __restrict__ const T* __restrict__ const T* __restrict__ g12

Definition at line 68 of file ax_helm_svv_factorized_kernel.h.

◆ 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__ const T* __restrict__ const T* __restrict__ const T* __restrict__ g13

Definition at line 69 of file ax_helm_svv_factorized_kernel.h.

◆ 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__ const T* __restrict__ const T* __restrict__ const T* __restrict__ g22

Definition at line 66 of file ax_helm_svv_factorized_kernel.h.

◆ 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 T* __restrict__ const T* __restrict__ const T* __restrict__ const T* __restrict__ g23
Initial value:
{
constexpr int P = PAD ? LX + 1 : LX

Definition at line 70 of file ax_helm_svv_factorized_kernel.h.

◆ 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__ const T* __restrict__ const T* __restrict__ const T* __restrict__ g33

Definition at line 67 of file ax_helm_svv_factorized_kernel.h.

◆ h1

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

Definition at line 60 of file ax_helm_svv_factorized_kernel.h.

◆ h1_svv

__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__ h1_svv

Definition at line 64 of file ax_helm_svv_factorized_kernel.h.

◆ i

const int i = threadIdx.x

Definition at line 94 of file ax_helm_svv_factorized_kernel.h.

◆ ij

const int ij = i + j*LX

Definition at line 95 of file ax_helm_svv_factorized_kernel.h.

◆ ij_p

const int ij_p = i + j*P

Definition at line 96 of file ax_helm_svv_factorized_kernel.h.

◆ j

const int j = threadIdx.y

Definition at line 93 of file ax_helm_svv_factorized_kernel.h.

◆ ru

T ru[LX]

Definition at line 87 of file ax_helm_svv_factorized_kernel.h.

◆ rut

T rut

Definition at line 89 of file ax_helm_svv_factorized_kernel.h.

◆ rut_svv

T rut_svv

Definition at line 90 of file ax_helm_svv_factorized_kernel.h.

◆ rw

T rw[LX]

Definition at line 88 of file ax_helm_svv_factorized_kernel.h.

◆ shbr

shbr[ij_p] = br[ij]

Definition at line 77 of file ax_helm_svv_factorized_kernel.h.

◆ shbs

shbs[ij_p] = bs[ij]

Definition at line 78 of file ax_helm_svv_factorized_kernel.h.

◆ shbt

shbt[ij_p] = bt[ij]

Definition at line 79 of file ax_helm_svv_factorized_kernel.h.

◆ shdx

shdx[ij_p] = dx[ij]

Definition at line 74 of file ax_helm_svv_factorized_kernel.h.

◆ shdy

shdy[ij_p] = dy[ij]

Definition at line 75 of file ax_helm_svv_factorized_kernel.h.

◆ shdz

shdz[ij_p] = dz[ij]

Definition at line 76 of file ax_helm_svv_factorized_kernel.h.

◆ shu

__shared__ T shu[LX *P]

Definition at line 81 of file ax_helm_svv_factorized_kernel.h.

◆ shur

__shared__ T shur[LX *LX]

Definition at line 82 of file ax_helm_svv_factorized_kernel.h.

◆ shur_svv

__shared__ T shur_svv[LX *LX]

Definition at line 84 of file ax_helm_svv_factorized_kernel.h.

◆ shus

__shared__ T shus[LX *P]

Definition at line 83 of file ax_helm_svv_factorized_kernel.h.

◆ shus_svv

__shared__ T shus_svv[LX *P]

Definition at line 85 of file ax_helm_svv_factorized_kernel.h.

◆ u

__global__ void const T* __restrict__ u

Definition at line 56 of file ax_helm_svv_factorized_kernel.h.