1#ifndef __MATH_MATH_KERNEL_H__
2#define __MATH_MATH_KERNEL_H__
48 for (
int i = idx;
i < n;
i +=
str) {
67 for (
int i = idx;
i < m;
i +=
str) {
68 a[
i] = b[mask[
i+1]-1];
85 for (
int i = idx;
i < m;
i +=
str) {
86 a[mask[
i+1]-1] = b[mask[
i+1]-1];
109template<
typename T >
118 for (
int i = idx;
i < n;
i +=
str) {
126template<
typename T >
134 for (
int i = idx;
i < n;
i +=
str) {
142template<
typename T >
151 for (
int i = idx;
i < n;
i +=
str) {
159template<
typename T >
167 for (
int i = idx;
i < n;
i +=
str) {
175template<
typename T >
183 for (
int i = idx;
i < n;
i +=
str) {
191template<
typename T >
200 for (
int i = idx;
i < n;
i +=
str) {
208template<
typename T >
218 for (
int i = idx;
i < n;
i +=
str) {
219 a[
i] = b[
i] + c[
i] + d[
i];
226template<
typename T >
235 for (
int i = idx;
i < n;
i +=
str) {
243template<
typename T >
254 for (
int i = idx;
i < n;
i+=
str) {
257 tmp += p[
j][
i]*alpha[
j];
266template<
typename T >
275 for (
int i = idx;
i < n;
i +=
str) {
283template<
typename T >
292 for (
int i = idx;
i < n;
i +=
str) {
300template<
typename T >
311 for (
int i = idx;
i < n;
i +=
str) {
319template<
typename T >
327 for (
int i = idx;
i < n;
i +=
str) {
335template<
typename T >
343 for (
int i = idx;
i < n;
i +=
str) {
351template<
typename T >
359 for (
int i = idx;
i < n;
i +=
str) {
367template<
typename T >
376 for (
int i = idx;
i < n;
i +=
str) {
384template<
typename T >
393 for (
int i = idx;
i < n;
i +=
str) {
394 a[
i] =
a[
i] - b[
i] * c[
i];
401template<
typename T >
409 for (
int i = idx;
i < n;
i +=
str) {
417template<
typename T >
426 for (
int i = idx;
i < n;
i +=
str) {
434template<
typename T >
443 for (
int i = idx;
i < n;
i +=
str) {
444 a[
i] =
a[
i] + b[
i] * c[
i];
452template<
typename T >
462 for (
int i = idx;
i < n;
i +=
str) {
463 a[
i] =
a[
i] + b[
i] * c[
i] * d[
i];
471template<
typename T >
484 for (
int i = idx;
i < n;
i +=
str) {
493template<
typename T >
508 for (
int i = idx;
i < n;
i +=
str) {
511 u3[
i] = v1[
i]*w2[
i] - v2[
i]*w1[
i];
533template<
typename T >
539 for (
int i = idx;
i<n ;
i +=
str)
565template<
typename T >
576 for (
int i=idx ;
i<n ;
i+=step)
600template<
typename T >
615 for (
int i = idx;
i < n;
i+=
str) {
635template<
typename T >
650 for (
int i = idx;
i < n;
i+=
str) {
676template<
typename T >
690 for (
int i = idx;
i < n;
i+=
str) {
711template<
typename T >
724 for (
int i = idx;
i<n ;
i +=
str)
746template<
typename T >
753 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 pwmin_vec3_kernel(T *__restrict__ a, const T *__restrict__ b, const T *__restrict__ c, 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 pwmax_vec3_kernel(T *__restrict__ a, const T *__restrict__ b, const T *__restrict__ c, const int n)
__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 pwmax_sca2_kernel(T *__restrict__ a, const T c, const int n)
__global__ void pwmin_vec2_kernel(T *__restrict__ a, const T *__restrict__ b, const int n)
__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 pwmax_vec2_kernel(T *__restrict__ a, const T *__restrict__ b, 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 pwmin_sca3_kernel(T *__restrict__ a, const T *__restrict b, const T c, const int n)
__global__ void pwmax_sca3_kernel(T *__restrict__ a, const T *__restrict b, const T 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 pwmin_sca2_kernel(T *__restrict__ a, 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)