Neko 1.99.7
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
ax_helm.cu File Reference
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "ax_helm_kernel.h"
#include "elem_block_tune.h"
#include <device/device_config.h>
#include <device/cuda/check.h>
#include <common/neko_log.h>

Go to the source code of this file.

Macros

#define CASE_1D(LX, C)
 
#define CASE_1D_SEL(LX, SEL)
 
#define CASE_KSTEP(LX, C)
 
#define CASE_KSTEP_PADDED(LX, C)
 
#define CASE_KSTEP_SEL(LX, SEL)
 
#define CASE_KSTEP_PADDED_SEL(LX, SEL)
 
#define CASE(LX)
 
#define CASE_PADDED(LX)
 
#define CASE_LARGE(LX)
 
#define CASE_LARGE_PADDED(LX)
 
#define AX_VEC_EB(LX)   (elem_block<LX, NEKO_AX_HELM_VECTOR_EB_C>::value)
 
#define AX_VEC_NTHRDS(LX)   dim3((LX), (LX), AX_VEC_EB(LX))
 
#define AX_VEC_NBLCKS(LX)    dim3(((*nelv) + AX_VEC_EB(LX) - 1)/AX_VEC_EB(LX), 1, 1)
 
#define CASE_VECTOR_KSTEP(LX)
 
#define CASE_VECTOR_KSTEP_PADDED(LX)
 
#define CASE_VECTOR(LX)
 
#define CASE_VECTOR_PADDED(LX)
 

Functions

template<const int >
int tune (void *w, void *u, void *dx, void *dy, void *dz, void *dxt, void *dyt, void *dzt, void *h1, void *g11, void *g22, void *g33, void *g12, void *g13, void *g23, int *nelv, int *lx, int *eb_sel, int *ch_sel)
 
template<const int >
int tune_padded (void *w, void *u, void *dx, void *dy, void *dz, void *dxt, void *dyt, void *dzt, void *h1, void *g11, void *g22, void *g33, void *g12, void *g13, void *g23, int *nelv, int *lx, int *eb_sel, int *ch_sel)
 
void cuda_ax_helm (void *w, void *u, void *dx, void *dy, void *dz, void *dxt, void *dyt, void *dzt, void *h1, void *g11, void *g22, void *g33, void *g12, void *g13, void *g23, int *nelv, int *lx)
 
void cuda_ax_helm_vector (void *au, void *av, void *aw, void *u, void *v, void *w, void *dx, void *dy, void *dz, void *dxt, void *dyt, void *dzt, void *h1, void *g11, void *g22, void *g33, void *g12, void *g13, void *g23, int *nelv, int *lx)
 
void cuda_ax_helm_vector_part2 (void *au, void *av, void *aw, void *u, void *v, void *w, void *h2, void *B, int *n)
 

Macro Definition Documentation

◆ AX_VEC_EB

#define AX_VEC_EB (   LX)    (elem_block<LX, NEKO_AX_HELM_VECTOR_EB_C>::value)

◆ AX_VEC_NBLCKS

#define AX_VEC_NBLCKS (   LX)     dim3(((*nelv) + AX_VEC_EB(LX) - 1)/AX_VEC_EB(LX), 1, 1)

◆ AX_VEC_NTHRDS

#define AX_VEC_NTHRDS (   LX)    dim3((LX), (LX), AX_VEC_EB(LX))

◆ CASE

#define CASE (   LX)
Value:
case LX: \
if(autotune[LX] == 0 ) { \
dx, dy, dz, \
dxt, dyt, dzt,h1, \
g11, g22, g33, \
g12, g13, g23, nelv, lx, \
} else if (autotune[LX] == 1 ) { \
} else if (autotune[LX] == 2 ) { \
} \
break
__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 T *__restrict__ T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ w
__global__ void T *__restrict__ T *__restrict__ const T *__restrict__ u
__global__ void T *__restrict__ T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ dx
__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
__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
__global__ void T *__restrict__ 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__ 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__ 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__ 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__ 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__ 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__ g33
__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__ dzt
__global__ void const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ dyt
__global__ void const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ dxt

◆ CASE_1D

#define CASE_1D (   LX,
  C 
)
Value:
<<<nblcks_1d, NEKO_CHUNKS_NTHRDS(LX, C), 0, stream>>> \
((real *) w, (real *) u, \
(real *) dx, (real *) dy, (real *) dz, \
(real *) dxt, (real *) dyt, (real *) dzt, (real *) h1,\
(real *) g11, (real *) g22, (real *) g33, \
(real *) g12, (real *) g13, (real *) g23); \
__global__ void ax_helm_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)
#define NEKO_CHUNKS(LX, C)
Definition elem_block.h:145
#define NEKO_CHUNKS_NTHRDS(LX, C)
Definition elem_block.h:146
double real

◆ CASE_1D_SEL

#define CASE_1D_SEL (   LX,
  SEL 
)
Value:
switch (SEL) { \
case 0: CASE_1D(LX, 0); break; \
case 1: CASE_1D(LX, 1); break; \
case 2: CASE_1D(LX, 2); break; \
default: CASE_1D(LX, 3); break; \
}
#define CASE_1D(LX, C)

◆ CASE_KSTEP

#define CASE_KSTEP (   LX,
  C 
)
Value:
<<<NEKO_EB_NBLCKS(*nelv, LX, C), NEKO_EB_NTHRDS(LX, C), 0, stream>>> \
((real *) w, (real *) u, \
(real *) dx, (real *) dy, (real *) dz, (real *) h1, \
(real *) g11, (real *) g22, (real *) g33, \
(real *) g12, (real *) g13, (real *) g23, *nelv); \
#define NEKO_EB(LX, C)
Definition elem_block.h:104
#define NEKO_EB_NBLCKS(NELV, LX, C)
Definition elem_block.h:106
#define NEKO_EB_NTHRDS(LX, C)
Definition elem_block.h:105

◆ CASE_KSTEP_PADDED

#define CASE_KSTEP_PADDED (   LX,
  C 
)
Value:
<<<NEKO_EB_NBLCKS(*nelv, LX, C), NEKO_EB_NTHRDS(LX, C), 0, stream>>> \
((real *) w, (real *) u, \
(real *) dx, (real *) dy, (real *) dz, (real *) h1, \
(real *) g11, (real *) g22, (real *) g33, \
(real *) g12, (real *) g13, (real *) g23, *nelv); \

◆ CASE_KSTEP_PADDED_SEL

#define CASE_KSTEP_PADDED_SEL (   LX,
  SEL 
)
Value:
switch (SEL) { \
case 0: CASE_KSTEP_PADDED(LX, 0); break; \
case 1: CASE_KSTEP_PADDED(LX, 1); break; \
default: CASE_KSTEP_PADDED(LX, 2); break; \
}
#define CASE_KSTEP_PADDED(LX, C)

◆ CASE_KSTEP_SEL

#define CASE_KSTEP_SEL (   LX,
  SEL 
)
Value:
switch (SEL) { \
case 0: CASE_KSTEP(LX, 0); break; \
case 1: CASE_KSTEP(LX, 1); break; \
default: CASE_KSTEP(LX, 2); break; \
}
#define CASE_KSTEP(LX, C)

◆ CASE_LARGE

#define CASE_LARGE (   LX)
Value:
case LX: \
break

◆ CASE_LARGE_PADDED

#define CASE_LARGE_PADDED (   LX)
Value:
case LX: \
break

◆ CASE_PADDED

#define CASE_PADDED (   LX)
Value:
case LX: \
if(autotune[LX] == 0 ) { \
dx, dy, dz, \
dxt, dyt, dzt,h1, \
g11, g22, g33, \
g12, g13, g23,nelv,lx, \
} else if (autotune[LX] == 1 ) { \
} else if (autotune[LX] == 2 ) { \
} \
break

◆ CASE_VECTOR

#define CASE_VECTOR (   LX)
Value:
case LX: \
break

◆ CASE_VECTOR_KSTEP

#define CASE_VECTOR_KSTEP (   LX)
Value:
<<<AX_VEC_NBLCKS(LX), AX_VEC_NTHRDS(LX), 0, stream>>> \
((real *) au, (real *) av, (real *) aw, \
(real *) u, (real *) v, (real *) w, \
(real *) dx, (real *) dy, (real *) dz, \
(real *) h1, (real *) g11, (real *) g22, \
(real *) g33, (real *) g12, (real *) g13, \
(real *) g23, *nelv); \
#define AX_VEC_NTHRDS(LX)
#define AX_VEC_EB(LX)
#define AX_VEC_NBLCKS(LX)
__global__ void T *__restrict__ T *__restrict__ aw
__global__ void T *__restrict__ av
__global__ void T *__restrict__ T *__restrict__ const T *__restrict__ const T *__restrict__ v

◆ CASE_VECTOR_KSTEP_PADDED

#define CASE_VECTOR_KSTEP_PADDED (   LX)
Value:
<<<AX_VEC_NBLCKS(LX), AX_VEC_NTHRDS(LX), 0, stream>>> \
((real *) au, (real *) av, (real *) aw, \
(real *) u, (real *) v, (real *) w, \
(real *) dx, (real *) dy, (real *) dz, \
(real *) h1, (real *) g11, (real *) g22, \
(real *) g33, (real *) g12, (real *) g13, \
(real *) g23, *nelv); \

◆ CASE_VECTOR_PADDED

#define CASE_VECTOR_PADDED (   LX)
Value:
case LX: \
break

Function Documentation

◆ cuda_ax_helm()

void cuda_ax_helm ( void w,
void u,
void dx,
void dy,
void dz,
void dxt,
void dyt,
void dzt,
void h1,
void g11,
void g22,
void g33,
void g12,
void g13,
void g23,
int nelv,
int lx 
)

Fortran wrapper for device CUDA Ax

Definition at line 64 of file ax_helm.cu.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cuda_ax_helm_vector()

void cuda_ax_helm_vector ( void au,
void av,
void aw,
void u,
void v,
void w,
void dx,
void dy,
void dz,
void dxt,
void dyt,
void dzt,
void h1,
void g11,
void g22,
void g33,
void g12,
void g13,
void g23,
int nelv,
int lx 
)

Fortran wrapper for device CUDA Ax vector version

Definition at line 217 of file ax_helm.cu.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cuda_ax_helm_vector_part2()

void cuda_ax_helm_vector_part2 ( void au,
void av,
void aw,
void u,
void v,
void w,
void h2,
void B,
int n 
)

Fortran wrapper for device CUDA Ax vector version part2

Definition at line 295 of file ax_helm.cu.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tune()

template<const int >
int tune ( void w,
void u,
void dx,
void dy,
void dz,
void dxt,
void dyt,
void dzt,
void h1,
void g11,
void g22,
void g33,
void g12,
void g13,
void g23,
int nelv,
int lx,
int eb_sel,
int ch_sel 
)

Definition at line 311 of file ax_helm.cu.

Here is the call graph for this function:

◆ tune_padded()

template<const int >
int tune_padded ( void w,
void u,
void dx,
void dy,
void dz,
void dxt,
void dyt,
void dzt,
void h1,
void g11,
void g22,
void g33,
void g12,
void g13,
void g23,
int nelv,
int lx,
int eb_sel,
int ch_sel 
)

Definition at line 440 of file ax_helm.cu.

Here is the call graph for this function: