35#include <hip/hip_runtime.h>
42 ({ __typeof__ (a) _a = (a); \
43 __typeof__ (b) _b = (b); \
67 const int w1 = nu * nu *
nv;
69 int work = (w1 >
w3) ? w1 :
w3;
71 work = ((work + 64 - 1) / 64) * 64;
72 if (work > 1024) work = 1024;
73 if (work < 64) work = 64;
81 void *
A,
void *
Bt,
void *
Ct,
int *nel) {
89 hipLaunchKernelGGL(HIP_KERNEL_NAME(tnsr3d_kernel<real, N>), \
91 (hipStream_t) glb_cmd_queue, \
94 (real *) A, (real *) Bt, (real *) Ct); \
95 HIP_CHECK(hipGetLastError()); \
124 void *
A,
void *
Bt,
void *
Ct,
int * elements,
int* n_points) {
128 int n =
max(*nu,*
nv);
131 hipLaunchKernelGGL(HIP_KERNEL_NAME(tnsr3d_el_kernel<real, N>), \
133 (hipStream_t) glb_cmd_queue, \
136 (real *) A, (real *) Bt, (real *) Ct, \
137 (int *) elements, *n_points); \
138 HIP_CHECK(hipGetLastError()); \
__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__ u
__global__ void T *__restrict__ T *__restrict__ const T *__restrict__ const T *__restrict__ v
__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__ w3
static int hip_tnsr3d_nthrds(const int nu, const int nv)
void hip_tnsr3d(void *v, int *nv, void *u, int *nu, void *A, void *Bt, void *Ct, int *nel)
void hip_tnsr3d_el_list(void *v, int *nv, void *u, int *nu, void *A, void *Bt, void *Ct, int *elements, int *n_points)