Neko  0.8.1
A portable framework for high-order spectral element flow simulations
opr_lambda2.hip File Reference
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <hip/hip_runtime.h>
#include "lambda2_kernel.h"
#include <device/device_config.h>
#include <device/hip/check.h>
#include <common/neko_log.h>
Include dependency graph for opr_lambda2.hip:

Go to the source code of this file.

Macros

#define CASE_1D(LX)
 
#define CASE_KSTEP(LX)
 
#define CASE(LX)
 

Functions

template<const int >
int tune_lambda2 (void *ux, void *uy, void *uz, void *u, void *dx, void *dy, void *dz, void *drdx, void *dsdx, void *dtdx, void *drdy, void *dsdy, void *dtdy, void *drdz, void *dsdz, void *dtdz, void *jacinv, int *nel, int *lx)
 
void hip_lambda2 (void *lambda2, void *u, void *v, void *w, void *dx, void *dy, void *dz, void *drdx, void *dsdx, void *dtdx, void *drdy, void *dsdy, void *dtdy, void *drdz, void *dsdz, void *dtdz, void *jacinv, int *nel, int *lx)
 

Macro Definition Documentation

◆ CASE

#define CASE (   LX)
Value:
case LX: \
if(autotune[LX] == 0 ) { \
autotune[LX]=tune_lambda2<LX>(lambda2, u, v, w, \
dx, dy, dz, \
drdx, dsdx, dtdx, \
drdy, dsdy, dtdy, \
drdz, dsdz, dtdz, \
jacinv, nel, lx); \
} else if (autotune[LX] == 1 ) { \
CASE_1D(LX); \
} else if (autotune[LX] == 2 ) { \
CASE_KSTEP(LX); \
} \
break
__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__ const T *__restrict__ const T *__restrict__ jacinv
Definition: conv1_kernel.h:148
__global__ void const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ dz
Definition: conv1_kernel.h:138
__global__ void const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ dx
Definition: conv1_kernel.h:136
__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__ drdx
Definition: conv1_kernel.h:139
__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__ dtdx
Definition: conv1_kernel.h:141
__global__ void const T *__restrict__ u
Definition: conv1_kernel.h:132
__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__ const T *__restrict__ dtdz
Definition: conv1_kernel.h:147
__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__ dsdx
Definition: conv1_kernel.h:140
__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__ dtdy
Definition: conv1_kernel.h:144
__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__ dsdz
Definition: conv1_kernel.h:146
__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__ dsdy
Definition: conv1_kernel.h:143
__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__ drdy
Definition: conv1_kernel.h:142
__global__ void const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ dy
Definition: conv1_kernel.h:137
__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__ drdz
Definition: conv1_kernel.h:145
__global__ void const T *__restrict__ const T *__restrict__ const T *__restrict__ w
__global__ void const T *__restrict__ const T *__restrict__ v
A simulation component that computes lambda2 The values are stored in the field registry under the na...
Definition: lambda2.f90:37

◆ CASE_1D

#define CASE_1D (   LX)
Value:
hipLaunchKernelGGL( HIP_KERNEL_NAME(lambda2_kernel_1d<real, LX, 1024> ), \
nblcks, nthrds_1d, 0, (hipStream_t) glb_cmd_queue, \
(real *) lambda2, (real *) u, (real *) v, (real *) w, \
(real *) dx, (real *) dy, (real *) dz, \
(real *) drdx, (real *) dsdx, (real *) dtdx, \
(real *) drdy, (real *) dsdy, (real *) dtdy, \
(real *) drdz, (real *) dsdz, (real *) dtdz, \
(real *) jacinv); \
HIP_CHECK(hipGetLastError());
double real
Definition: device_config.h:12
void * glb_cmd_queue

◆ CASE_KSTEP

#define CASE_KSTEP (   LX)
Value:
hipLaunchKernelGGL( HIP_KERNEL_NAME(lambda2_kernel_kstep<real, LX> ), \
nblcks, nthrds_kstep, 0, (hipStream_t) glb_cmd_queue, \
(real *) lambda2, (real *) u, (real *) v, (real *) w, \
(real *) dx, (real *) dy, (real *) dz, \
(real *) drdx, (real *) dsdx, (real *) dtdx, \
(real *) drdy, (real *) dsdy, (real *) dtdy, \
(real *) drdz, (real *) dsdz, (real *) dtdz, \
(real *) jacinv); \
HIP_CHECK(hipGetLastError());

Function Documentation

◆ hip_lambda2()

void hip_lambda2 ( void *  lambda2,
void *  u,
void *  v,
void *  w,
void *  dx,
void *  dy,
void *  dz,
void *  drdx,
void *  dsdx,
void *  dtdx,
void *  drdy,
void *  dsdy,
void *  dtdy,
void *  drdz,
void *  dsdz,
void *  dtdz,
void *  jacinv,
int *  nel,
int *  lx 
)

Fortran wrapper for device hip convective terms

Definition at line 60 of file opr_lambda2.hip.

◆ tune_lambda2()

template<const int >
int tune_lambda2 ( void *  ux,
void *  uy,
void *  uz,
void *  u,
void *  dx,
void *  dy,
void *  dz,
void *  drdx,
void *  dsdx,
void *  dtdx,
void *  drdy,
void *  dsdy,
void *  dtdy,
void *  drdz,
void *  dsdz,
void *  dtdz,
void *  jacinv,
int *  nel,
int *  lx 
)

Definition at line 136 of file opr_lambda2.hip.

Here is the call graph for this function: