Neko  0.8.1
A portable framework for high-order spectral element flow simulations
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>
Include dependency graph for math.cu:

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_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_cfill (void *a, real *c, int *n)
 
void cuda_add2 (void *a, void *b, 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)
 
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)
 

Variables

int red_s = 0
 
realbufred = NULL
 
realbufred_d = NULL
 

Function Documentation

◆ cuda_add2()

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

Fortran wrapper for add2 Vector addition \( a = a + b \)

Definition at line 139 of file math.cu.

Here is the caller 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 155 of file math.cu.

Here is the caller 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 171 of file math.cu.

Here is the caller 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 188 of file math.cu.

Here is the caller 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 222 of file math.cu.

Here is the caller 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 338 of file math.cu.

Here is the caller 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 353 of file math.cu.

Here is the caller 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 205 of file math.cu.

Here is the caller 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 = \sum a_i + s \)

Definition at line 109 of file math.cu.

Here is the caller 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 124 of file math.cu.

Here is the caller 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 81 of file math.cu.

Here is the caller 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 95 of file math.cu.

Here is the caller 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 266 of file math.cu.

Here is the caller 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 280 of file math.cu.

Here is the caller 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 49 of file math.cu.

Here is the caller 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 508 of file math.cu.

Here is the call graph for this function:
Here is the caller 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 427 of file math.cu.

Here is the call graph for this function:
Here is the caller 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 466 of file math.cu.

Here is the call graph for this function:
Here is the caller 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 549 of file math.cu.

Here is the call graph for this function:
Here is the caller 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 238 of file math.cu.

Here is the caller 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 252 of file math.cu.

Here is the caller 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 58 of file math.cu.

Here is the caller graph for this function:

◆ cuda_rzero()

void cuda_rzero ( void *  a,
int *  n 
)

Fortran wrapper for rzero Zero a real vector

Definition at line 73 of file math.cu.

Here is the caller 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 309 of file math.cu.

Here is the caller 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 323 of file math.cu.

Here is the caller 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 294 of file math.cu.

Here is the caller 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 368 of file math.cu.

Here is the caller 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 393 of file math.cu.

Here is the caller graph for this function:

Variable Documentation

◆ bufred

real* bufred = NULL

Definition at line 386 of file math.cu.

◆ bufred_d

real* bufred_d = NULL

Definition at line 387 of file math.cu.

◆ red_s

int red_s = 0

Definition at line 385 of file math.cu.