1#ifndef __MATH_MATH_KERNEL_H__
2#define __MATH_MATH_KERNEL_H__
48 for (
int i = idx;
i < n;
i +=
str) {
66 for (
int i = idx;
i < m;
i +=
str) {
67 a[mask[
i+1]-1] = b[mask[
i+1]-1];
84 for (
int i = idx;
i < m;
i +=
str) {
85 a[
i] = b[mask[
i+1]-1];
102 for (
int i = idx;
i < m;
i +=
str) {
111template<
typename T >
127template<
typename T >
136 for (
int i = idx;
i < n;
i +=
str) {
144template<
typename T >
152 for (
int i = idx;
i < n;
i +=
str) {
160template<
typename T >
169 for (
int i = idx;
i < n;
i +=
str) {
177template<
typename T >
185 for (
int i = idx;
i < n;
i +=
str) {
193template<
typename T >
201 for (
int i = idx;
i < n;
i +=
str) {
209template<
typename T >
218 for (
int i = idx;
i < n;
i +=
str) {
226template<
typename T >
236 for (
int i = idx;
i < n;
i +=
str) {
237 a[
i] = b[
i] + c[
i] + d[
i];
244template<
typename T >
253 for (
int i = idx;
i < n;
i +=
str) {
261template<
typename T >
272 for (
int i = idx;
i < n;
i+=
str) {
275 tmp += p[
j][
i]*alpha[
j];
284template<
typename T >
293 for (
int i = idx;
i < n;
i +=
str) {
301template<
typename T >
310 for (
int i = idx;
i < n;
i +=
str) {
318template<
typename T >
329 for (
int i = idx;
i < n;
i +=
str) {
337template<
typename T >
345 for (
int i = idx;
i < n;
i +=
str) {
353template<
typename T >
361 for (
int i = idx;
i < n;
i +=
str) {
369template<
typename T >
377 for (
int i = idx;
i < n;
i +=
str) {
385template<
typename T >
394 for (
int i = idx;
i < n;
i +=
str) {
402template<
typename T >
411 for (
int i = idx;
i < n;
i +=
str) {
412 a[
i] =
a[
i] - b[
i] * c[
i];
419template<
typename T >
427 for (
int i = idx;
i < n;
i +=
str) {
435template<
typename T >
444 for (
int i = idx;
i < n;
i +=
str) {
452template<
typename T >
461 for (
int i = idx;
i < n;
i +=
str) {
462 a[
i] =
a[
i] + b[
i] * c[
i];
470template<
typename T >
480 for (
int i = idx;
i < n;
i +=
str) {
481 a[
i] =
a[
i] + b[
i] * c[
i] * d[
i];
489template<
typename T >
502 for (
int i = idx;
i < n;
i +=
str) {
511template<
typename T >
526 for (
int i = idx;
i < n;
i +=
str) {
529 u3[
i] = v1[
i]*w2[
i] - v2[
i]*w1[
i];
550template<
typename T >
556 for (
int i = idx;
i<n ;
i +=
str)
582template<
typename T >
593 for (
int i=idx ;
i<n ;
i+=step)
616template<
typename T >
631 for (
int i = idx;
i < n;
i+=
str) {
651template<
typename T >
666 for (
int i = idx;
i < n;
i+=
str) {
693template<
typename T >
707 for (
int i = idx;
i < n;
i+=
str) {
727template<
typename T >
740 for (
int i = idx;
i<n ;
i +=
str)
762template<
typename T >
769 for (
int i = idx;
i < n;
i +=
str) {
__global__ void const T *__restrict__ x
__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
__global__ void dirichlet_apply_scalar_kernel(const int *__restrict__ msk, T *__restrict__ x, const T g, const int m)
__global__ void addcol4_kernel(T *__restrict__ a, const T *__restrict__ b, const T *__restrict__ c, const T *__restrict__ d, const int n)
__global__ void reduce_kernel(T *bufred, const int n)
__global__ void invcol2_kernel(T *__restrict__ a, const T *__restrict__ b, const int n)
__global__ void add2_kernel(T *__restrict__ a, const T *__restrict__ b, const int n)
__inline__ __device__ T reduce_warp(T val)
__global__ void masked_atomic_reduction_kernel(T *__restrict__ a, T *__restrict__ b, int *__restrict__ mask, const int n, const int m)
__global__ void masked_copy_kernel(T *__restrict__ a, T *__restrict__ b, int *__restrict__ mask, const int n, const int m)
__global__ void glsc3_many_kernel(const T *a, const T **b, const T *c, T *buf_h, const int j, const int n)
__global__ void cfill_mask_kernel(T *__restrict__ a, const T c, const int size, int *__restrict__ mask, const int mask_size)
__global__ void glsc3_reduce_kernel(T *bufred, const int n, const int j)
__global__ void add3s2_kernel(T *__restrict__ a, const T *__restrict__ b, const T *__restrict__ c, const T c1, const T c2, const int n)
__global__ void add2s1_kernel(T *__restrict__ a, const T *__restrict__ b, const T c1, const int n)
__global__ void add2s2_many_kernel(T *__restrict__ x, const T **p, const T *alpha, const int p_cur, const int n)
__global__ void cmult_kernel(T *__restrict__ a, const T c, const int n)
__global__ void addcol3_kernel(T *__restrict__ a, const T *__restrict__ b, const T *__restrict__ c, const int n)
__global__ void col2_kernel(T *__restrict__ a, const T *__restrict__ b, const int n)
__global__ void col3_kernel(T *__restrict__ a, const T *__restrict__ b, const T *__restrict__ c, const int n)
__global__ void sub2_kernel(T *__restrict__ a, const T *__restrict__ b, const int n)
__global__ void glsc2_kernel(const T *a, const T *b, T *buf_h, const int n)
__global__ void cmult2_kernel(T *__restrict__ a, T *__restrict__ b, const T c, const int n)
__global__ void sub3_kernel(T *__restrict__ a, const T *__restrict__ b, const T *__restrict__ c, const int n)
__global__ void glsum_kernel(const T *a, T *buf_h, const int n)
__global__ void glsc3_kernel(const T *a, const T *b, const T *c, T *buf_h, const int n)
__global__ void add2s2_kernel(T *__restrict__ a, const T *__restrict__ b, const T c1, const int n)
__global__ void vdot3_kernel(T *__restrict__ dot, const T *__restrict__ u1, const T *__restrict__ u2, const T *__restrict__ u3, const T *__restrict__ v1, const T *__restrict__ v2, const T *__restrict__ v3, const int n)
__global__ void invcol1_kernel(T *__restrict__ a, const int n)
__global__ void add3_kernel(T *__restrict__ a, const T *__restrict__ b, const T *__restrict__ c, const int n)
__global__ void add4_kernel(T *__restrict__ a, const T *__restrict__ b, const T *__restrict__ c, const T *__restrict__ d, const int n)
__global__ void cfill_kernel(T *__restrict__ a, const T c, const int n)
__global__ void masked_red_copy_kernel(T *__restrict__ a, T *__restrict__ b, int *__restrict__ mask, const int n, const int m)
__global__ void vcross_kernel(T *__restrict__ u1, T *__restrict__ u2, T *__restrict__ u3, const T *__restrict__ v1, const T *__restrict__ v2, const T *__restrict__ v3, const T *__restrict__ w1, const T *__restrict__ w2, const T *__restrict__ w3, const int n)
__global__ void addsqr2s2_kernel(T *__restrict__ a, const T *__restrict__ b, const T c1, const int n)
__global__ void cadd2_kernel(T *__restrict__ a, T *__restrict__ b, const T c, const int n)
__global__ void absval_kernel(T *__restrict__ a, const int n)
__global__ void subcol3_kernel(T *__restrict__ a, const T *__restrict__ b, const T *__restrict__ c, const int n)
__global__ void cadd_kernel(T *__restrict__ a, const T c, const int n)