Neko  0.9.0
A portable framework for high-order spectral element flow simulations
math_kernel.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<typename T >
__global__ void cmult_kernel (T *__restrict__ a, const T c, const int n)
 
template<typename T >
__global__ void masked_red_copy_kernel (T *__restrict__ a, T *__restrict__ b, int *__restrict__ mask, const int n, const int m)
 
template<typename T >
__global__ void masked_copy_kernel (T *__restrict__ a, T *__restrict__ b, int *__restrict__ mask, const int n, const int m)
 
template<typename T >
__global__ void cfill_mask_kernel (T *__restrict__ a, const T c, const int size, int *__restrict__ mask, const int mask_size)
 
template<typename T >
__global__ void cmult2_kernel (T *__restrict__ a, T *__restrict__ b, const T c, const int n)
 
template<typename T >
__global__ void cadd_kernel (T *__restrict__ a, const T c, const int n)
 
template<typename T >
__global__ void cadd2_kernel (T *__restrict__ a, T *__restrict__ b, const T c, const int n)
 
template<typename T >
__global__ void cfill_kernel (T *__restrict__ a, const T c, const int n)
 
template<typename T >
__global__ void add2_kernel (T *__restrict__ a, const T *__restrict__ b, const int n)
 
template<typename T >
__global__ void add3_kernel (T *__restrict__ a, const T *__restrict__ b, const T *__restrict__ c, const int n)
 
template<typename T >
__global__ void add4_kernel (T *__restrict__ a, const T *__restrict__ b, const T *__restrict__ c, const T *__restrict__ d, const int n)
 
template<typename T >
__global__ void add2s1_kernel (T *__restrict__ a, const T *__restrict__ b, const T c1, const int n)
 
template<typename T >
__global__ void add2s2_many_kernel (T *__restrict__ x, const T **p, const T *alpha, const int p_cur, const int n)
 
template<typename T >
__global__ void add2s2_kernel (T *__restrict__ a, const T *__restrict__ b, const T c1, const int n)
 
template<typename T >
__global__ void addsqr2s2_kernel (T *__restrict__ a, const T *__restrict__ b, const T c1, const int n)
 
template<typename T >
__global__ void add3s2_kernel (T *__restrict__ a, const T *__restrict__ b, const T *__restrict__ c, const T c1, const T c2, const int n)
 
template<typename T >
__global__ void invcol1_kernel (T *__restrict__ a, const int n)
 
template<typename T >
__global__ void invcol2_kernel (T *__restrict__ a, const T *__restrict__ b, const int n)
 
template<typename T >
__global__ void col2_kernel (T *__restrict__ a, const T *__restrict__ b, const int n)
 
template<typename T >
__global__ void col3_kernel (T *__restrict__ a, const T *__restrict__ b, const T *__restrict__ c, const int n)
 
template<typename T >
__global__ void subcol3_kernel (T *__restrict__ a, const T *__restrict__ b, const T *__restrict__ c, const int n)
 
template<typename T >
__global__ void sub2_kernel (T *__restrict__ a, const T *__restrict__ b, const int n)
 
template<typename T >
__global__ void sub3_kernel (T *__restrict__ a, const T *__restrict__ b, const T *__restrict__ c, const int n)
 
template<typename T >
__global__ void addcol3_kernel (T *__restrict__ a, const T *__restrict__ b, const T *__restrict__ c, const int n)
 
template<typename T >
__global__ void addcol4_kernel (T *__restrict__ a, const T *__restrict__ b, const T *__restrict__ c, const T *__restrict__ d, const int n)
 
template<typename T >
__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)
 
template<typename T >
__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)
 
template<typename T >
__inline__ __device__ T reduce_warp (T val)
 
template<typename T >
__global__ void reduce_kernel (T *bufred, const int n)
 
template<typename T >
__global__ void glsc3_reduce_kernel (T *bufred, const int n, const int j)
 
template<typename T >
__global__ void glsc3_kernel (const T *a, const T *b, const T *c, T *buf_h, const int n)
 
template<typename T >
__global__ void glsc3_many_kernel (const T *a, const T **b, const T *c, T *buf_h, const int j, const int n)
 
template<typename T >
__global__ void glsc2_kernel (const T *a, const T *b, T *buf_h, const int n)
 
template<typename T >
__global__ void glsum_kernel (const T *a, T *buf_h, const int n)
 
template<typename T >
__global__ void absval_kernel (T *__restrict__ a, const int n)
 
template<typename T >
__global__ void pwmax_vec2_kernel (T *__restrict__ a, const T *__restrict__ b, const int n)
 
template<typename T >
__global__ void pwmax_vec3_kernel (T *__restrict__ a, const T *__restrict__ b, const T *__restrict__ c, const int n)
 
template<typename T >
__global__ void pwmax_sca2_kernel (T *__restrict__ a, const T c, const int n)
 
template<typename T >
__global__ void pwmax_sca3_kernel (T *__restrict__ a, const T *__restrict b, const T c, const int n)
 
template<typename T >
__global__ void pwmin_vec2_kernel (T *__restrict__ a, const T *__restrict__ b, const int n)
 
template<typename T >
__global__ void pwmin_vec3_kernel (T *__restrict__ a, const T *__restrict__ b, const T *__restrict__ c, const int n)
 
template<typename T >
__global__ void pwmin_sca2_kernel (T *__restrict__ a, const T c, const int n)
 
template<typename T >
__global__ void pwmin_sca3_kernel (T *__restrict__ a, const T *__restrict b, const T c, const int n)
 

Function Documentation

◆ absval_kernel()

template<typename T >
__global__ void absval_kernel ( T *__restrict__  a,
const int  n 
)

Device kernel for abs_value

Definition at line 747 of file math_kernel.h.

◆ add2_kernel()

template<typename T >
__global__ void add2_kernel ( T *__restrict__  a,
const T *__restrict__  b,
const int  n 
)

Device kernel for add2

Definition at line 176 of file math_kernel.h.

◆ add2s1_kernel()

template<typename T >
__global__ void add2s1_kernel ( T *__restrict__  a,
const T *__restrict__  b,
const T  c1,
const int  n 
)

Device kernel for add2s1

Definition at line 227 of file math_kernel.h.

◆ add2s2_kernel()

template<typename T >
__global__ void add2s2_kernel ( T *__restrict__  a,
const T *__restrict__  b,
const T  c1,
const int  n 
)

Device kernel for add2s2

Definition at line 267 of file math_kernel.h.

◆ add2s2_many_kernel()

template<typename T >
__global__ void add2s2_many_kernel ( T *__restrict__  x,
const T **  p,
const T *  alpha,
const int  p_cur,
const int  n 
)

Device kernel for add2s2 many

Definition at line 244 of file math_kernel.h.

◆ add3_kernel()

template<typename T >
__global__ void add3_kernel ( T *__restrict__  a,
const T *__restrict__  b,
const T *__restrict__  c,
const int  n 
)

Device kernel for add3

Definition at line 192 of file math_kernel.h.

◆ add3s2_kernel()

template<typename T >
__global__ void add3s2_kernel ( T *__restrict__  a,
const T *__restrict__  b,
const T *__restrict__  c,
const T  c1,
const T  c2,
const int  n 
)

Device kernel for add3s2

Definition at line 301 of file math_kernel.h.

◆ add4_kernel()

template<typename T >
__global__ void add4_kernel ( T *__restrict__  a,
const T *__restrict__  b,
const T *__restrict__  c,
const T *__restrict__  d,
const int  n 
)

Device kernel for add4

Definition at line 209 of file math_kernel.h.

◆ addcol3_kernel()

template<typename T >
__global__ void addcol3_kernel ( T *__restrict__  a,
const T *__restrict__  b,
const T *__restrict__  c,
const int  n 
)

Device kernel for addcol3

Definition at line 435 of file math_kernel.h.

◆ addcol4_kernel()

template<typename T >
__global__ void addcol4_kernel ( T *__restrict__  a,
const T *__restrict__  b,
const T *__restrict__  c,
const T *__restrict__  d,
const int  n 
)

Device kernel for addcol4

Definition at line 453 of file math_kernel.h.

◆ addsqr2s2_kernel()

template<typename T >
__global__ void addsqr2s2_kernel ( T *__restrict__  a,
const T *__restrict__  b,
const T  c1,
const int  n 
)

Device kernel for addsqr2s2

Definition at line 284 of file math_kernel.h.

◆ cadd2_kernel()

template<typename T >
__global__ void cadd2_kernel ( T *__restrict__  a,
T *__restrict__  b,
const T  c,
const int  n 
)

Device kernel for cadd2

Definition at line 143 of file math_kernel.h.

◆ cadd_kernel()

template<typename T >
__global__ void cadd_kernel ( T *__restrict__  a,
const T  c,
const int  n 
)

Device kernel for cadd

Definition at line 127 of file math_kernel.h.

◆ cfill_kernel()

template<typename T >
__global__ void cfill_kernel ( T *__restrict__  a,
const T  c,
const int  n 
)

Device kernel for cfill

Definition at line 160 of file math_kernel.h.

◆ cfill_mask_kernel()

template<typename T >
__global__ void cfill_mask_kernel ( T *__restrict__  a,
const T  c,
const int  size,
int *__restrict__  mask,
const int  mask_size 
)

Device kernel for cfill_mask

Definition at line 94 of file math_kernel.h.

◆ cmult2_kernel()

template<typename T >
__global__ void cmult2_kernel ( T *__restrict__  a,
T *__restrict__  b,
const T  c,
const int  n 
)

Device kernel for cmult2

Definition at line 110 of file math_kernel.h.

◆ cmult_kernel()

template<typename T >
__global__ void cmult_kernel ( T *__restrict__  a,
const T  c,
const int  n 
)

Device kernel for cmult

Definition at line 41 of file math_kernel.h.

◆ col2_kernel()

template<typename T >
__global__ void col2_kernel ( T *__restrict__  a,
const T *__restrict__  b,
const int  n 
)

Device kernel for col2

Definition at line 352 of file math_kernel.h.

◆ col3_kernel()

template<typename T >
__global__ void col3_kernel ( T *__restrict__  a,
const T *__restrict__  b,
const T *__restrict__  c,
const int  n 
)

Device kernel for col3

Definition at line 368 of file math_kernel.h.

◆ glsc2_kernel()

template<typename T >
__global__ void glsc2_kernel ( const T *  a,
const T *  b,
T *  buf_h,
const int  n 
)

Device kernel for glsc2

Definition at line 677 of file math_kernel.h.

Here is the call graph for this function:

◆ glsc3_kernel()

template<typename T >
__global__ void glsc3_kernel ( const T *  a,
const T *  b,
const T *  c,
T *  buf_h,
const int  n 
)

Device kernel for glsc3

Definition at line 601 of file math_kernel.h.

Here is the call graph for this function:

◆ glsc3_many_kernel()

template<typename T >
__global__ void glsc3_many_kernel ( const T *  a,
const T **  b,
const T *  c,
T *  buf_h,
const int  j,
const int  n 
)

Device kernel for glsc3 many

Definition at line 636 of file math_kernel.h.

Here is the call graph for this function:

◆ glsc3_reduce_kernel()

template<typename T >
__global__ void glsc3_reduce_kernel ( T *  bufred,
const int  n,
const int  j 
)

Reduction kernel for glsc3

Definition at line 566 of file math_kernel.h.

Here is the call graph for this function:

◆ glsum_kernel()

template<typename T >
__global__ void glsum_kernel ( const T *  a,
T *  buf_h,
const int  n 
)

Device kernel for glsum

Definition at line 712 of file math_kernel.h.

Here is the call graph for this function:

◆ invcol1_kernel()

template<typename T >
__global__ void invcol1_kernel ( T *__restrict__  a,
const int  n 
)

Device kernel for invcol1

Definition at line 320 of file math_kernel.h.

◆ invcol2_kernel()

template<typename T >
__global__ void invcol2_kernel ( T *__restrict__  a,
const T *__restrict__  b,
const int  n 
)

Device kernel for invcol2

Definition at line 336 of file math_kernel.h.

◆ masked_copy_kernel()

template<typename T >
__global__ void masked_copy_kernel ( T *__restrict__  a,
T *__restrict__  b,
int *__restrict__  mask,
const int  n,
const int  m 
)

Device kernel for masked copy

Definition at line 76 of file math_kernel.h.

◆ masked_red_copy_kernel()

template<typename T >
__global__ void masked_red_copy_kernel ( T *__restrict__  a,
T *__restrict__  b,
int *__restrict__  mask,
const int  n,
const int  m 
)

Device kernel for masked red copy

Definition at line 58 of file math_kernel.h.

◆ pwmax_sca2_kernel()

template<typename T >
__global__ void pwmax_sca2_kernel ( T *__restrict__  a,
const T  c,
const int  n 
)

Device kernel for point-wise max of vector and scalar a = max(a, c)

Definition at line 795 of file math_kernel.h.

◆ pwmax_sca3_kernel()

template<typename T >
__global__ void pwmax_sca3_kernel ( T *__restrict__  a,
const T *__restrict  b,
const T  c,
const int  n 
)

Device kernel for point-wise max of vector and scalar a = max(b, c)

Definition at line 808 of file math_kernel.h.

◆ pwmax_vec2_kernel()

template<typename T >
__global__ void pwmax_vec2_kernel ( T *__restrict__  a,
const T *__restrict__  b,
const int  n 
)

Device kernel for point-wise max of two vectors a = max(a, b)

Definition at line 767 of file math_kernel.h.

◆ pwmax_vec3_kernel()

template<typename T >
__global__ void pwmax_vec3_kernel ( T *__restrict__  a,
const T *__restrict__  b,
const T *__restrict__  c,
const int  n 
)

Device kernel for point-wise max of two vectors a = max(b, c)

Definition at line 780 of file math_kernel.h.

◆ pwmin_sca2_kernel()

template<typename T >
__global__ void pwmin_sca2_kernel ( T *__restrict__  a,
const T  c,
const int  n 
)

Device kernel for point-wise min of vector and scalar a = min(a, c)

Definition at line 851 of file math_kernel.h.

◆ pwmin_sca3_kernel()

template<typename T >
__global__ void pwmin_sca3_kernel ( T *__restrict__  a,
const T *__restrict  b,
const T  c,
const int  n 
)

Device kernel for point-wise min of vector and scalar a = min(b, c)

Definition at line 864 of file math_kernel.h.

◆ pwmin_vec2_kernel()

template<typename T >
__global__ void pwmin_vec2_kernel ( T *__restrict__  a,
const T *__restrict__  b,
const int  n 
)

Device kernel for point-wise min of two vectors a = min(a, b)

Definition at line 823 of file math_kernel.h.

◆ pwmin_vec3_kernel()

template<typename T >
__global__ void pwmin_vec3_kernel ( T *__restrict__  a,
const T *__restrict__  b,
const T *__restrict__  c,
const int  n 
)

Device kernel for point-wise min of two vectors a = min(b, c)

Definition at line 836 of file math_kernel.h.

◆ reduce_kernel()

template<typename T >
__global__ void reduce_kernel ( T *  bufred,
const int  n 
)

Vector reduction kernel

Definition at line 534 of file math_kernel.h.

Here is the call graph for this function:

◆ reduce_warp()

template<typename T >
__inline__ __device__ T reduce_warp ( val)

Warp shuffle reduction

Definition at line 521 of file math_kernel.h.

◆ sub2_kernel()

template<typename T >
__global__ void sub2_kernel ( T *__restrict__  a,
const T *__restrict__  b,
const int  n 
)

Device kernel for sub2

Definition at line 402 of file math_kernel.h.

◆ sub3_kernel()

template<typename T >
__global__ void sub3_kernel ( T *__restrict__  a,
const T *__restrict__  b,
const T *__restrict__  c,
const int  n 
)

Device kernel for sub3

Definition at line 418 of file math_kernel.h.

◆ subcol3_kernel()

template<typename T >
__global__ void subcol3_kernel ( T *__restrict__  a,
const T *__restrict__  b,
const T *__restrict__  c,
const int  n 
)

Device kernel for subcol3

Definition at line 385 of file math_kernel.h.

◆ vcross_kernel()

template<typename T >
__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 
)

Device kernel for vcross

Definition at line 494 of file math_kernel.h.

◆ vdot3_kernel()

template<typename T >
__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 
)

Device kernel for vdot3

Definition at line 472 of file math_kernel.h.