MPI_jacsolve
 All Files Functions Variables
Functions
jacsolve_gpu.h File Reference
#include <mpi.h>

Go to the source code of this file.

Functions

void JacobiSolve_GPU_4 (const int nnode, const int nx, const int ny, const int neigh[], const int color, const MPI::Intracomm &icomm, const int id_d[], const int ik_d[], const float sk_d[], const float f_d[], float u_d[], float r_d[], float w_d[], float dd_d[], const dim3 dimGrid, const dim3 dimBlock)
 
void JacobiSolve_GPU (const int nnode, const int id[], const int ik[], const float sk[], const float f[], float u[])
 
float dscapr_GPU (const int n, const float x[], const float y[])
 Calculates the Euclidian inner product of two vectors on GPU. More...
 
void vddiv_GPU (const int n, float x[], const float y[], const float z[])
 Element-wise vector divison x = y/z. More...
 
void vdaxpy_GPU (const int n, float x[], const float y[], const float a, const float z[])
 Element-wise vector multiplication x = y*z. A stride iy =0 for the source stride adds a constant value stored in y[0]. The same holds for vector z. More...
 
void set_value_GPU (const int n, float x[], const float a)
 
void Defect_GPU (float w[], const float f[], const float u[], const int nnode, const int id[], const int ik[], const float sk[])
 
void GetDiag_GPU (const int nnode, const int id[], const int ik[], const float sk[], float d[])
 

Function Documentation

void Defect_GPU ( float  w[],
const float  f[],
const float  u[],
const int  nnode,
const int  id[],
const int  ik[],
const float  sk[] 
)
float dscapr_GPU ( const int  n,
const float  x[],
const float  y[] 
)

Calculates the Euclidian inner product of two vectors on GPU.

Parameters
[in]nnumber of elements in both vectors.
[in]xsource vector on GPU
[in]ysource vector on GPU
Returns
Euclidian inner product $\langle x,y \rangle$ on GPU
void GetDiag_GPU ( const int  nnode,
const int  id[],
const int  ik[],
const float  sk[],
float  d[] 
)

Copies the diagonal entries of a CSR matrix (sk,id, ik) onto a vector d.

Parameters
[in]nnodenumber of rows
[in]idindex vector containing the last entry in a CSR row
[in]ikcolumn index vector of CSR matrix
[in]skvector non-zero entries of CSR matrix
[out]daccumulated diagonal entries of CSR matrix
void JacobiSolve_GPU ( const int  nnode,
const int  id[],
const int  ik[],
const float  sk[],
const float  f[],
float  u[] 
)

Solves linear system of equations K u = f via the Jacobi iteration. We use a distributed symmetric CSR matrix K(sk,id, ik) and initial guess of the solution is set to 0.

Parameters
[in]nnodenumber of nodes and number of rows
[in]skvector non-zero entries of CSR matrix
[in]idindex vector containing the last entry in a CSR row
[in]ikcolumn index vector of CSR matrix
[in]fdistributed local vector storing the right hand side
[out]uaccumulated local vector storing the solution.
void JacobiSolve_GPU_4 ( const int  nnode,
const int  nx,
const int  ny,
const int  neigh[],
const int  color,
const MPI::Intracomm &  icomm,
const int  id_d[],
const int  ik_d[],
const float  sk_d[],
const float  f_d[],
float  u_d[],
float  r_d[],
float  w_d[],
float  dd_d[],
const dim3  dimGrid,
const dim3  dimBlock 
)

Solves linear system of equations K u = f via the Jacobi iteration. We use a distributed symmetric CSR matrix K(sk,id, ik) and initial guess of the solution is set to 0.

Parameters
[in]nnodenumber of nodes and number of rows
[in]nxlocal number intervals in x-direction
[in]nylocal number intervals in x-direction
[in]neighneighbors in parallel
[in]colormy color in parallel
[in]sk_don GPU: vector non-zero entries of CSR matrix
[in]id_don GPU: index vector containing the last entry in a CSR row
[in]ik_don GPU: column index vector of CSR matrix
[in]f_don GPU: distributed local vector storing the right hand side
[out]u_don GPU: accumulated local vector storing the solution.
[in,out]r_don GPU: residuum (aux. vector)
[in,out]w_don GPU: correction (aux. vector)
[in,out]dd_don GPU: diagonale values(aux. vector)
[in]dimGridnumber of blockthreads
[in]dimBlocknumber of threads per block
void set_value_GPU ( const int  n,
float  x[],
const float  a 
)
void vdaxpy_GPU ( const int  n,
float  x[],
const float  y[],
const float  a,
const float  z[] 
)

Element-wise vector multiplication x = y*z. A stride iy =0 for the source stride adds a constant value stored in y[0]. The same holds for vector z.

Parameters
[in]nnumber of elements to multiply
[out]xtarget vector
[in]ixstride for target vector x
[in]ysource vector
[in]iystride for source vector y
[in]zsource vector
[in]izstride for source vector z
void vddiv_GPU ( const int  n,
float  x[],
const float  y[],
const float  z[] 
)

Element-wise vector divison x = y/z.

Parameters
[in]nnumber of elements to divide
[out]xtarget vector
[in]ysource vector
[in]zsource vector