35#ifndef __GS_GS_KERNELS__
36#define __GS_GS_KERNELS__
57 for (
int i = idx;
i <
nb;
i +=
str) {
62 tmp +=
u[
gd[
k +
j] - 1];
68 for (
int i = ((
abs(
o) - 1) + idx);
i < m ;
i +=
str) {
74 for (
int i = ((
o - 1) + idx);
i < m ;
i +=
str) {
102 for (
int i = idx;
i <
nb;
i +=
str) {
105 T tmp =
u[
gd[
k] - 1];
107 tmp *=
u[
gd[
k +
j] - 1];
113 for (
int i = ((
abs(
o) - 1) + idx);
i < m ;
i +=
str) {
119 for (
int i = ((
o - 1) + idx);
i < m ;
i +=
str) {
132template<
typename T >
147 for (
int i = idx;
i <
nb;
i +=
str) {
150 T tmp =
u[
gd[
k] - 1];
158 for (
int i = ((
abs(
o) - 1) + idx);
i < m ;
i +=
str) {
164 for (
int i = ((
o - 1) + idx);
i < m ;
i +=
str) {
177template<
typename T >
192 for (
int i = idx;
i <
nb;
i +=
str) {
195 T tmp =
u[
gd[
k] - 1];
203 for (
int i = ((
abs(
o) - 1) + idx);
i < m ;
i +=
str) {
209 for (
int i = ((
o - 1) + idx);
i < m ;
i +=
str) {
222template<
typename T >
236 for (
int i = idx;
i <
nb;
i +=
str) {
239 T tmp =
v[
dg[
k] - 1];
241 u[
gd[
k +
j] - 1] = tmp;
257template<
typename T >
272template<
typename T >
314template<
typename T >
358template<
typename T >
388template<
typename T >
392 const int n,
const int nc,
const int ns) {
399 const int idx = dof[
j] - 1;
400 for (
int c = 0; c <
nc; c++)
404template<
typename T >
408 const int n,
const int nc,
418 for (
int c = 0; c <
nc; c++)
421 for (
int c = 0; c <
nc; c++)
426template<
typename T >
430 const int n,
const int nc,
440 for (
int c = 0; c <
nc; c++)
443 for (
int c = 0; c <
nc; c++)
448template<
typename T >
452 const int n,
const int nc,
462 for (
int c = 0; c <
nc; c++)
465 for (
int c = 0; c <
nc; c++)
__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
__device__ T atomicMaxFloat(T *address, T val)
__global__ void gs_unpack_max_kernel(T *__restrict__ u, const T *__restrict__ buf, const int32_t *__restrict__ dof, const int n)
__global__ void gather_kernel_min(T *__restrict__ v, const int m, const int o, const int *__restrict__ dg, const T *__restrict__ u, const int n, const int *__restrict__ gd, const int nb, const int *__restrict__ b, const int *__restrict__ bo)
__global__ void scatter_kernel(T *__restrict__ v, const int m, const int *__restrict__ dg, T *__restrict__ u, const int n, const int *__restrict__ gd, const int nb, const int *__restrict__ b, const int *__restrict__ bo)
__global__ void gs_unpack_add_vec_kernel(T *__restrict__ u, const T *__restrict__ buf, const int32_t *__restrict__ dof, const int n, const int nc, const int ns)
__global__ void gs_unpack_max_vec_kernel(T *__restrict__ u, const T *__restrict__ buf, const int32_t *__restrict__ dof, const int n, const int nc, const int ns)
__global__ void gather_kernel_mul(T *__restrict__ v, const int m, const int o, const int *__restrict__ dg, const T *__restrict__ u, const int n, const int *__restrict__ gd, const int nb, const int *__restrict__ b, const int *__restrict__ bo)
__device__ T atomicMinFloat(T *address, T val)
__global__ void gs_pack_kernel(const T *__restrict__ u, T *__restrict__ buf, const int32_t *__restrict__ dof, const int n)
__global__ void gs_unpack_min_kernel(T *__restrict__ u, const T *__restrict__ buf, const int32_t *__restrict__ dof, const int n)
__global__ void gather_kernel_add(T *__restrict__ v, const int m, const int o, const int *__restrict__ dg, const T *__restrict__ u, const int n, const int *__restrict__ gd, const int nb, const int *__restrict__ b, const int *__restrict__ bo)
__device__ double atomicMaxFloat< double >(double *address, double val)
__device__ float atomicMaxFloat< float >(float *address, float val)
__global__ void gs_unpack_add_kernel(T *__restrict__ u, const T *__restrict__ buf, const int32_t *__restrict__ dof, const int n)
__global__ void gather_kernel_max(T *__restrict__ v, const int m, const int o, const int *__restrict__ dg, const T *__restrict__ u, const int n, const int *__restrict__ gd, const int nb, const int *__restrict__ b, const int *__restrict__ bo)
__global__ void gs_unpack_min_vec_kernel(T *__restrict__ u, const T *__restrict__ buf, const int32_t *__restrict__ dof, const int n, const int nc, const int ns)
__device__ float atomicMinFloat< float >(float *address, float val)
__global__ void gs_pack_vec_kernel(const T *__restrict__ u, T *__restrict__ buf, const int32_t *__restrict__ dof, const int n, const int nc, const int ns)
__device__ double atomicMinFloat< double >(double *address, double val)