Processing math: 100%
Neko 0.9.99
A portable framework for high-order spectral element flow simulations
All Classes Namespaces Files Functions Variables Typedefs Enumerator Macros Pages
math.cu File Reference
#include "math_kernel.h"
#include <device/device_config.h>
#include <device/cuda/check.h>
#include <stdio.h>
#include <stdlib.h>
#include <math/bcknd/device/device_mpi_reduce.h>
#include <math/bcknd/device/device_mpi_op.h>

Go to the source code of this file.

Functions

void cuda_copy (void *a, void *b, int *n)
 
void cuda_masked_copy (void *a, void *b, void *mask, int *n, int *m)
 
void cuda_masked_red_copy (void *a, void *b, void *mask, int *n, int *m)
 
void cuda_masked_atomic_reduction (void *a, void *b, void *mask, int *n, int *m)
 
void cuda_cfill_mask (void *a, real *c, int *size, int *mask, int *mask_size)
 
void cuda_rzero (void *a, int *n)
 
void cuda_cmult (void *a, real *c, int *n)
 
void cuda_cmult2 (void *a, void *b, real *c, int *n)
 
void cuda_cadd (void *a, real *c, int *n)
 
void cuda_cadd2 (void *a, void *b, real *c, int *n)
 
void cuda_cfill (void *a, real *c, int *n)
 
void cuda_add2 (void *a, void *b, int *n)
 
void cuda_add3 (void *a, void *b, void *c, int *n)
 
void cuda_add4 (void *a, void *b, void *c, void *d, int *n)
 
void cuda_add2s1 (void *a, void *b, real *c1, int *n)
 
void cuda_add2s2 (void *a, void *b, real *c1, int *n)
 
void cuda_add2s2_many (void *x, void **p, void *alpha, int *j, int *n)
 
void cuda_addsqr2s2 (void *a, void *b, real *c1, int *n)
 
void cuda_add3s2 (void *a, void *b, void *c, real *c1, real *c2, int *n)
 
void cuda_invcol1 (void *a, int *n)
 
void cuda_invcol2 (void *a, void *b, int *n)
 
void cuda_col2 (void *a, void *b, int *n)
 
void cuda_col3 (void *a, void *b, void *c, int *n)
 
void cuda_subcol3 (void *a, void *b, void *c, int *n)
 
void cuda_sub2 (void *a, void *b, int *n)
 
void cuda_sub3 (void *a, void *b, void *c, int *n)
 
void cuda_addcol3 (void *a, void *b, void *c, int *n)
 
void cuda_addcol4 (void *a, void *b, void *c, void *d, int *n)
 
void cuda_vdot3 (void *dot, void *u1, void *u2, void *u3, void *v1, void *v2, void *v3, int *n)
 
void cuda_vcross (void *u1, void *u2, void *u3, void *v1, void *v2, void *v3, void *w1, void *w2, void *w3, int *n)
 
real cuda_vlsc3 (void *u, void *v, void *w, int *n)
 
real cuda_glsc3 (void *a, void *b, void *c, int *n)
 
void cuda_glsc3_many (real *h, void *w, void *v, void *mult, int *j, int *n)
 
real cuda_glsc2 (void *a, void *b, int *n)
 
real cuda_glsum (void *a, int *n)
 
void cuda_absval (void *a, int *n)
 
void cuda_pwmax_vec2 (void *a, void *b, int *n)
 
void cuda_pwmax_vec3 (void *a, void *b, void *c, int *n)
 
void cuda_pwmax_sca2 (void *a, real *c, int *n)
 
void cuda_pwmax_sca3 (void *a, void *b, real *c, int *n)
 
void cuda_pwmin_vec2 (void *a, void *b, int *n)
 
void cuda_pwmin_vec3 (void *a, void *b, void *c, int *n)
 
void cuda_pwmin_sca2 (void *a, real *c, int *n)
 
void cuda_pwmin_sca3 (void *a, void *b, real *c, int *n)
 

Variables

int red_s = 0
 
realbufred = NULL
 
voidbufred_d = NULL
 

Function Documentation

◆ cuda_absval()

void cuda_absval ( void a,
int n 
)

Fortran wrapper absval Take the abs value of a vector of length n

Definition at line 826 of file math.cu.

Here is the call graph for this function:

◆ cuda_add2()

void cuda_add2 ( void a,
void b,
int n 
)

Fortran wrapper for add2 Vector addition a = a + b

Definition at line 207 of file math.cu.

Here is the call graph for this function:

◆ cuda_add2s1()

void cuda_add2s1 ( void a,
void b,
real c1,
int n 
)

Fortran wrapper for add2s1 Vector addition with scalar multiplication a = c_1 a + b (multiplication on first argument)

Definition at line 252 of file math.cu.

Here is the call graph for this function:

◆ cuda_add2s2()

void cuda_add2s2 ( void a,
void b,
real c1,
int n 
)

Fortran wrapper for add2s2 Vector addition with scalar multiplication a = a + c_1 b (multiplication on second argument)

Definition at line 268 of file math.cu.

Here is the call graph for this function:

◆ cuda_add2s2_many()

void cuda_add2s2_many ( void x,
void **  p,
void alpha,
int j,
int n 
)

Fortran wrapper for add2s2 Vector addition with scalar multiplication x = x + c_1 p1 + c_2p2 + ... + c_jpj (multiplication on second argument)

Definition at line 285 of file math.cu.

Here is the call graph for this function:

◆ cuda_add3()

void cuda_add3 ( void a,
void b,
void c,
int n 
)

Fortran wrapper for add3 Vector addition a = b + c

Definition at line 222 of file math.cu.

Here is the call graph for this function:

◆ cuda_add3s2()

void cuda_add3s2 ( void a,
void b,
void c,
real c1,
real c2,
int n 
)

Fortran wrapper for add3s2 Vector addition with scalar multiplication a = c_1 b + c_2 c (multiplication on second argument)

Definition at line 319 of file math.cu.

Here is the call graph for this function:

◆ cuda_add4()

void cuda_add4 ( void a,
void b,
void c,
void d,
int n 
)

Fortran wrapper for add4 Vector addition a = b + c + d

Definition at line 237 of file math.cu.

Here is the call graph for this function:

◆ cuda_addcol3()

void cuda_addcol3 ( void a,
void b,
void c,
int n 
)

Fortran wrapper for addcol3 a = a + b * c

Definition at line 435 of file math.cu.

Here is the call graph for this function:

◆ cuda_addcol4()

void cuda_addcol4 ( void a,
void b,
void c,
void d,
int n 
)

Fortran wrapper for addcol4 a = a + b * c * d

Definition at line 450 of file math.cu.

Here is the call graph for this function:

◆ cuda_addsqr2s2()

void cuda_addsqr2s2 ( void a,
void b,
real c1,
int n 
)

Fortran wrapper for addsqr2s2 Vector addition with scalar multiplication a = a + c_1 (b * b) (multiplication on second argument)

Definition at line 302 of file math.cu.

Here is the call graph for this function:

◆ cuda_cadd()

void cuda_cadd ( void a,
real c,
int n 
)

Fortran wrapper for cadd Add a scalar to vector a_i = a_i + c

Definition at line 161 of file math.cu.

Here is the call graph for this function:

◆ cuda_cadd2()

void cuda_cadd2 ( void a,
void b,
real c,
int n 
)

Fortran wrapper for cadd2 Add a scalar to vector a_i = b_i + c

Definition at line 176 of file math.cu.

Here is the call graph for this function:

◆ cuda_cfill()

void cuda_cfill ( void a,
real c,
int n 
)

Fortran wrapper for cfill Set all elements to a constant c a = c

Definition at line 190 of file math.cu.

Here is the call graph for this function:

◆ cuda_cfill_mask()

void cuda_cfill_mask ( void a,
real c,
int size,
int mask,
int mask_size 
)

Fortran wrapper for cfill_mask Fill a scalar to vector a_i = s, for i \in mask

Definition at line 112 of file math.cu.

Here is the call graph for this function:

◆ cuda_cmult()

void cuda_cmult ( void a,
real c,
int n 
)

Fortran wrapper for cmult Multiplication by constant c a = c \cdot a

Definition at line 133 of file math.cu.

Here is the call graph for this function:

◆ cuda_cmult2()

void cuda_cmult2 ( void a,
void b,
real c,
int n 
)

Fortran wrapper for cmult2 Multiplication by constant c a = c \cdot b

Definition at line 147 of file math.cu.

Here is the call graph for this function:

◆ cuda_col2()

void cuda_col2 ( void a,
void b,
int n 
)

Fortran wrapper for col2 Vector multiplication with 2 vectors a = a \cdot b

Definition at line 363 of file math.cu.

Here is the call graph for this function:

◆ cuda_col3()

void cuda_col3 ( void a,
void b,
void c,
int n 
)

Fortran wrapper for col3 Vector multiplication with 3 vectors a = b \cdot c

Definition at line 377 of file math.cu.

Here is the call graph for this function:

◆ cuda_copy()

void cuda_copy ( void a,
void b,
int n 
)

Fortran wrapper for copy Copy a vector a = b

Definition at line 59 of file math.cu.

Here is the call graph for this function:

◆ cuda_glsc2()

real cuda_glsc2 ( void a,
void b,
int n 
)

Fortran wrapper glsc2 Weighted inner product a^T b c

Definition at line 685 of file math.cu.

Here is the call graph for this function:

◆ cuda_glsc3()

real cuda_glsc3 ( void a,
void b,
void c,
int n 
)

Fortran wrapper glsc3 Weighted inner product a^T b c

Definition at line 546 of file math.cu.

Here is the call graph for this function:

◆ cuda_glsc3_many()

void cuda_glsc3_many ( real h,
void w,
void v,
void mult,
int j,
int n 
)

Fortran wrapper for doing an reduction to an array Weighted inner product w^T v(n,1:j) c

Definition at line 614 of file math.cu.

Here is the call graph for this function:

◆ cuda_glsum()

real cuda_glsum ( void a,
int n 
)

Fortran wrapper glsum Sum a vector of length n

Definition at line 756 of file math.cu.

Here is the call graph for this function:

◆ cuda_invcol1()

void cuda_invcol1 ( void a,
int n 
)

Fortran wrapper for invcol1 Invert a vector a = 1 / a

Definition at line 335 of file math.cu.

Here is the call graph for this function:

◆ cuda_invcol2()

void cuda_invcol2 ( void a,
void b,
int n 
)

Fortran wrapper for invcol2 Vector division a = a / b

Definition at line 349 of file math.cu.

Here is the call graph for this function:

◆ cuda_masked_atomic_reduction()

void cuda_masked_atomic_reduction ( void a,
void b,
void mask,
int n,
int m 
)

Fortran wrapper for masked atomic reduction update a vector a += b(mask) where mask is not unique

Definition at line 96 of file math.cu.

Here is the call graph for this function:

◆ cuda_masked_copy()

void cuda_masked_copy ( void a,
void b,
void mask,
int n,
int m 
)

Fortran wrapper for masked copy Copy a vector a(mask) = b(mask)

Definition at line 68 of file math.cu.

Here is the call graph for this function:

◆ cuda_masked_red_copy()

void cuda_masked_red_copy ( void a,
void b,
void mask,
int n,
int m 
)

Fortran wrapper for masked copy Copy a vector a(mask) = b(mask)

Definition at line 82 of file math.cu.

Here is the call graph for this function:

◆ cuda_pwmax_sca2()

void cuda_pwmax_sca2 ( void a,
real c,
int n 
)

Fortran wrapper for pwmax_sca2

Compute the maximum of vector and scalar a = \max(a, c)

Definition at line 875 of file math.cu.

Here is the call graph for this function:

◆ cuda_pwmax_sca3()

void cuda_pwmax_sca3 ( void a,
void b,
real c,
int n 
)

Fortran wrapper for pwmax_sca3

Compute the maximum of vector and scalar a = \max(b, c)

Definition at line 890 of file math.cu.

Here is the call graph for this function:

◆ cuda_pwmax_vec2()

void cuda_pwmax_vec2 ( void a,
void b,
int n 
)

Fortran wrapper for pwmax_vec2

Compute the maximum of two vectors a = \max(a, b)

Definition at line 845 of file math.cu.

Here is the call graph for this function:

◆ cuda_pwmax_vec3()

void cuda_pwmax_vec3 ( void a,
void b,
void c,
int n 
)

Fortran wrapper for pwmax_vec3

Compute the maximum of two vectors a = \max(b, c)

Definition at line 860 of file math.cu.

Here is the call graph for this function:

◆ cuda_pwmin_sca2()

void cuda_pwmin_sca2 ( void a,
real c,
int n 
)

Fortran wrapper for pwmin_sca2

Compute the minimum of vector and scalar a = \min(a, c)

Definition at line 935 of file math.cu.

Here is the call graph for this function:

◆ cuda_pwmin_sca3()

void cuda_pwmin_sca3 ( void a,
void b,
real c,
int n 
)

Fortran wrapper for pwmin_sca3

Compute the minimum of vector and scalar a = \min(b, c)

Definition at line 950 of file math.cu.

Here is the call graph for this function:

◆ cuda_pwmin_vec2()

void cuda_pwmin_vec2 ( void a,
void b,
int n 
)

Fortran wrapper for pwmin_vec2

Compute the minimum of two vectors a = \min(a, b)

Definition at line 905 of file math.cu.

Here is the call graph for this function:

◆ cuda_pwmin_vec3()

void cuda_pwmin_vec3 ( void a,
void b,
void c,
int n 
)

Fortran wrapper for pwmin_vec3

Compute the minimum of two vectors a = \min(b, c)

Definition at line 920 of file math.cu.

Here is the call graph for this function:

◆ cuda_rzero()

void cuda_rzero ( void a,
int n 
)

Fortran wrapper for rzero Zero a real vector

Definition at line 125 of file math.cu.

Here is the call graph for this function:

◆ cuda_sub2()

void cuda_sub2 ( void a,
void b,
int n 
)

Fortran wrapper for sub2 Vector subtraction a = a - b

Definition at line 406 of file math.cu.

Here is the call graph for this function:

◆ cuda_sub3()

void cuda_sub3 ( void a,
void b,
void c,
int n 
)

Fortran wrapper for sub3 Vector subtraction a = b - c

Definition at line 420 of file math.cu.

Here is the call graph for this function:

◆ cuda_subcol3()

void cuda_subcol3 ( void a,
void b,
void c,
int n 
)

Fortran wrapper for subcol3 Vector multiplication with 3 vectors a = a - b \cdot c

Definition at line 391 of file math.cu.

Here is the call graph for this function:

◆ cuda_vcross()

void cuda_vcross ( void u1,
void u2,
void u3,
void v1,
void v2,
void v3,
void w1,
void w2,
void w3,
int n 
)

Fortran wrapper for vcross u = v \times w

Definition at line 483 of file math.cu.

Here is the call graph for this function:

◆ cuda_vdot3()

void cuda_vdot3 ( void dot,
void u1,
void u2,
void u3,
void v1,
void v2,
void v3,
int n 
)

Fortran wrapper for vdot3 dot = u \cdot v

Definition at line 465 of file math.cu.

Here is the call graph for this function:

◆ cuda_vlsc3()

real cuda_vlsc3 ( void u,
void v,
void w,
int n 
)

Fortran wrapper vlsc3 Compute multiplication sum dot = u \cdot v \cdot w

Definition at line 512 of file math.cu.

Here is the call graph for this function:

Variable Documentation

◆ bufred

real* bufred = NULL

Definition at line 505 of file math.cu.

◆ bufred_d

void* bufred_d = NULL

Definition at line 506 of file math.cu.

◆ red_s

int red_s = 0

Definition at line 504 of file math.cu.