1#ifndef __MATH_DUDXYZ_KERNEL_H__
2#define __MATH_DUDXYZ_KERNEL_H__
45template<
typename T, const
int LX, const
int CHUNKS >
78 while(l < (
LX *
LX *
LX)) {
89 for (
int n = 0; n <
nchunks; n++) {
93 const int k =
jk /
LX;
99 for (
int l = 0; l <
LX; l++) {
113template<
typename T, const
int LX, const
int EB >
132 static_assert(
sizeof(
shu) +
137 "kstep block exceeds the shared memory budget");
176 for (
int k = 0;
k <
LX; ++
k) {
181 for (
int l = 0; l <
LX; l++) {
189 for (
int l = 0; l <
LX; l++) {
226#if defined(__CUDA_ARCH__) && (__CUDA_ARCH__ >= 800) && (__CUDA_ARCH__ < 1000)
228template< const
int LX, const
int NW >
277 const int wf =
tid >> 5;
278 const int ebase = pack::ebase();
301 const int i = p %
LX;
302 const int l = p /
LX;
304 for (
int b = 0; b <
PPA; b++) {
305 const int m = (b *
LX +
i) +
DMMA_P * (b *
LX + l);
356template<
typename T, const
int LX, const
int NW >
370#if defined(__CUDA_ARCH__) && (__CUDA_ARCH__ >= 800) && (__CUDA_ARCH__ < 1000)
373#define NEKO_DUDXYZ_DMMA_DISPATCH(LXV) \
374 template< const int NW > \
375 struct dudxyz_dmma_dispatch< double, LXV, NW > { \
376 __device__ static void run(double * __restrict__ du, \
377 const double * __restrict__ u, \
378 const double * __restrict__ dr, \
379 const double * __restrict__ ds, \
380 const double * __restrict__ dt, \
381 const double * __restrict__ dx, \
382 const double * __restrict__ dy, \
383 const double * __restrict__ dz, \
384 const double * __restrict__ jacinv, \
386 dudxyz_dmma_elem< LXV, NW >(du, u, dr, ds, dt, \
387 dx, dy, dz, jacinv, nelv); \
401template<
typename T, const
int LX, const
int NW >
445#if defined(__CUDA_ARCH__) && (__CUDA_ARCH__ >= 900) && \
446 (__CUDA_ARCH__ < 1000) && NEKO_TMA_TOOLKIT
448template< const
int LX, const
int NW >
510 const int wf =
tid >> 5;
585template<
typename T, const
int LX, const
int NW >
598#if defined(__CUDA_ARCH__) && (__CUDA_ARCH__ >= 900) && \
599 (__CUDA_ARCH__ < 1000) && NEKO_TMA_TOOLKIT
602#define NEKO_DUDXYZ_DMMA_TMA_DISPATCH(LXV) \
603 template< const int NW > \
604 struct dudxyz_dmma_tma_dispatch< double, LXV, NW > { \
605 __device__ static void run(double * __restrict__ du, \
606 const double * __restrict__ u, \
607 const double * __restrict__ dr, \
608 const double * __restrict__ ds, \
609 const double * __restrict__ dt, \
610 const double * __restrict__ dx, \
611 const double * __restrict__ dy, \
612 const double * __restrict__ dz, \
613 const double * __restrict__ jacinv) { \
614 dudxyz_dmma_tma_elem< LXV, NW >(du, u, dr, ds, dt, \
615 dx, dy, dz, jacinv); \
623template<
typename T, const
int LX, const
int NW >
__global__ void ale_add_kinematics_kernel(const int n, T *__restrict__ wx, T *__restrict__ wy, T *__restrict__ wz, const T *__restrict__ x_ref, const T *__restrict__ y_ref, const T *__restrict__ z_ref, const T *__restrict__ phi, const T *__restrict__ x, const T *__restrict__ y, const T *__restrict__ z, const kinematics_params_t kin_params)
__global__ void const T *__restrict__ x
__global__ void const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ dz
__global__ void const T *__restrict__ const T *__restrict__ dr
__global__ void const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ dy
__global__ void const T *__restrict__ const T *__restrict__ const T *__restrict__ ds
__shared__ T shdy[LX *LX]
__global__ void const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ dt
__global__ void const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ dx
__shared__ T shdx[LX *LX]
__shared__ T shdz[LX *LX]
__global__ void dudxyz_kernel_1d(T *__restrict__ du, const T *__restrict__ u, const T *__restrict__ dr, const T *__restrict__ ds, const T *__restrict__ dt, const T *__restrict__ dx, const T *__restrict__ dy, const T *__restrict__ dz, const T *__restrict__ jacinv)
__global__ void const T *__restrict__ u
__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 int nelv
__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__ jacinv
#define NEKO_EB_BOUNDS(NT)
static __device__ void run(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)
static __device__ void run(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__)