41 ({ __typeof__ (a) _a = (a); \
42 __typeof__ (b) _b = (b); \
47 static bool is_set =
false;
77 const int w1 = nu * nu *
nv;
79 int work = (w1 >
w3) ? w1 :
w3;
81 work = ((work + 32 - 1) / 32) * 32;
82 if (work > 1024) work = 1024;
83 if (work < 32) work = 32;
91 void *
A,
void *
Bt,
void *
Ct,
int *nel) {
99 tnsr3d_kernel<real, N> \
100 <<<nblcks, nthrds, 0, stream>>>((real *) v, *nv, \
102 (real *) A, (real *) Bt, (real *) Ct); \
103 CUDA_CHECK(cudaGetLastError()); \
106#define CASE_LARGE(N) \
108 const size_t shmem_size = 2 * N * N * N * sizeof(real); \
109 set_tnsr3d_large_shmem_attr<N>(shmem_size); \
110 tnsr3d_kernel_large<real, N> \
111 <<<nblcks, nthrds, shmem_size, stream>>>((real *) v, *nv, \
113 (real *) A, (real *) Bt, \
115 CUDA_CHECK(cudaGetLastError()); \
145 void *
A,
void *
Bt,
void *
Ct,
int * elements,
int* n_points) {
150 int n =
max(*nu,*
nv);
153 tnsr3d_el_kernel<real, N> \
154 <<<nblcks, nthrds, 0, stream>>>((real *) v, *nv, \
156 (real *) A, (real *) Bt, (real *) Ct, \
157 (int *) elements, *n_points); \
158 CUDA_CHECK(cudaGetLastError()); \
__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
void cuda_tnsr3d(void *v, int *nv, void *u, int *nu, void *A, void *Bt, void *Ct, int *nel)
void cuda_tnsr3d_el_list(void *v, int *nv, void *u, int *nu, void *A, void *Bt, void *Ct, int *elements, int *n_points)
static int cuda_tnsr3d_nthrds(const int nu, const int nv)
static void set_tnsr3d_large_shmem_attr(const size_t shmem_size)