MAGMA  1.6.1
Matrix Algebra for GPU and Multicore Architectures
 All Classes Files Functions Friends Groups Pages
double-complex precision

Functions

magma_int_t magma_zjacobisetup_matrix (magma_z_sparse_matrix A, magma_z_sparse_matrix *M, magma_z_vector *d, magma_queue_t queue)
 Prepares the Matrix M for the Jacobi Iteration according to x^(k+1) = D^(-1) * b - D^(-1) * (L+U) * x^k x^(k+1) = c - M * x^k. More...
 
magma_int_t magma_zjacobisetup_diagscal (magma_z_sparse_matrix A, magma_z_vector *d, magma_queue_t queue)
 It returns a vector d containing the inverse diagonal elements. More...
 
magma_int_t magma_zjacobisetup_vector (magma_z_vector b, magma_z_vector d, magma_z_vector *c, magma_queue_t queue)
 Prepares the Jacobi Iteration according to x^(k+1) = D^(-1) * b - D^(-1) * (L+U) * x^k x^(k+1) = c - M * x^k. More...
 
magma_int_t magma_zjacobisetup (magma_z_sparse_matrix A, magma_z_vector b, magma_z_sparse_matrix *M, magma_z_vector *c, magma_queue_t queue)
 Prepares the Jacobi Iteration according to x^(k+1) = D^(-1) * b - D^(-1) * (L+U) * x^k x^(k+1) = c - M * x^k. More...
 
magma_int_t magma_zjacobiiter (magma_z_sparse_matrix M, magma_z_vector c, magma_z_vector *x, magma_z_solver_par *solver_par, magma_queue_t queue)
 Iterates the solution approximation according to x^(k+1) = D^(-1) * b - D^(-1) * (L+U) * x^k x^(k+1) = c - M * x^k. More...
 
magma_int_t magma_zjacobiiter_precond (magma_z_sparse_matrix M, magma_z_vector *x, magma_z_solver_par *solver_par, magma_z_preconditioner *precond, magma_queue_t queue)
 Iterates the solution approximation according to x^(k+1) = D^(-1) * b - D^(-1) * (L+U) * x^k x^(k+1) = c - M * x^k. More...
 
magma_int_t magma_z_spmv (magmaDoubleComplex alpha, magma_z_sparse_matrix A, magma_z_vector x, magmaDoubleComplex beta, magma_z_vector y, magma_queue_t queue)
 For a given input matrix A and vectors x, y and scalars alpha, beta the wrapper determines the suitable SpMV computing y = alpha * A * x + beta * y. More...
 
magma_int_t magma_sparse_matrix_zlag2c (magma_z_sparse_matrix A, magma_c_sparse_matrix *B, magma_queue_t queue)
 convertes magma_z_sparse_matrix from Z to C More...
 
void magma_zcompactActive (magma_int_t m, magma_int_t n, magmaDoubleComplex_ptr dA, magma_int_t ldda, magmaInt_ptr active, magma_queue_t queue)
 ZCOMPACTACTIVE takes a set of n vectors of size m (in dA) and an array of 1s and 0sindicating which vectors to compact (for 1s) and which to disregard (for 0s). More...
 
magma_int_t magma_zgeelltmv (magma_trans_t transA, magma_int_t m, magma_int_t n, magma_int_t nnz_per_row, magmaDoubleComplex alpha, magmaDoubleComplex_ptr dval, magmaIndex_ptr dcolind, magmaDoubleComplex_ptr dx, magmaDoubleComplex beta, magmaDoubleComplex_ptr dy, magma_queue_t queue)
 This routine computes y = alpha * A^t * x + beta * y on the GPU. More...
 
magma_int_t magma_zjacobi_diagscal (int num_rows, magma_z_vector d, magma_z_vector b, magma_z_vector *c, magma_queue_t queue)
 Prepares the Jacobi Iteration according to x^(k+1) = D^(-1) * b - D^(-1) * (L+U) * x^k x^(k+1) = c - M * x^k. More...
 
magma_int_t magma_zgemvmdot (int n, int k, magmaDoubleComplex_ptr v, magmaDoubleComplex_ptr r, magmaDoubleComplex_ptr d1, magmaDoubleComplex_ptr d2, magmaDoubleComplex_ptr skp, magma_queue_t queue)
 This is an extension of the merged dot product above by chunking the set of vectors v_i such that the data always fits into cache. More...
 

Detailed Description

Function Documentation

magma_int_t magma_sparse_matrix_zlag2c ( magma_z_sparse_matrix  A,
magma_c_sparse_matrix *  B,
magma_queue_t  queue 
)

convertes magma_z_sparse_matrix from Z to C

Parameters
Amagma_z_sparse_matrix input matrix descriptor
Bmagma_c_sparse_matrix* output matrix descriptor
[in]queuemagma_queue_t Queue to execute in.
magma_int_t magma_z_spmv ( magmaDoubleComplex  alpha,
magma_z_sparse_matrix  A,
magma_z_vector  x,
magmaDoubleComplex  beta,
magma_z_vector  y,
magma_queue_t  queue 
)

For a given input matrix A and vectors x, y and scalars alpha, beta the wrapper determines the suitable SpMV computing y = alpha * A * x + beta * y.

Parameters
[in]alphamagmaDoubleComplex scalar alpha
[in]Amagma_z_sparse_matrix sparse matrix A
[in]xmagma_z_vector input vector x
[in]betamagmaDoubleComplex scalar beta
[out]ymagma_z_vector output vector y
[in]queuemagma_queue_t Queue to execute in.
void magma_zcompactActive ( magma_int_t  m,
magma_int_t  n,
magmaDoubleComplex_ptr  dA,
magma_int_t  ldda,
magmaInt_ptr  active,
magma_queue_t  queue 
)

ZCOMPACTACTIVE takes a set of n vectors of size m (in dA) and an array of 1s and 0sindicating which vectors to compact (for 1s) and which to disregard (for 0s).

Parameters
[in]mINTEGER The number of rows of the matrix dA. M >= 0.
[in]nINTEGER The number of columns of the matrix dA. N >= 0.
[in]in,out]dA COMPLEX DOUBLE PRECISION array, dimension (LDDA,N) The m by n matrix dA.
[in]lddaINTEGER The leading dimension of the array dA. LDDA >= max(1,M).
[in]activeINTEGER array, dimension N A mask of 1s and 0s showing if a vector remains or has been removed
[in]queuemagma_queue_t Queue to execute in.
magma_int_t magma_zgeelltmv ( magma_trans_t  transA,
magma_int_t  m,
magma_int_t  n,
magma_int_t  nnz_per_row,
magmaDoubleComplex  alpha,
magmaDoubleComplex_ptr  dval,
magmaIndex_ptr  dcolind,
magmaDoubleComplex_ptr  dx,
magmaDoubleComplex  beta,
magmaDoubleComplex_ptr  dy,
magma_queue_t  queue 
)

This routine computes y = alpha * A^t * x + beta * y on the GPU.

Input format is ELL.

Parameters
[in]transAmagma_trans_t transposition parameter for A
[in]mmagma_int_t number of rows in A
[in]nmagma_int_t number of columns in A
[in]nnz_per_rowmagma_int_t number of elements in the longest row
[in]alphamagmaDoubleComplex scalar multiplier
[in]dvalmagmaDoubleComplex_ptr array containing values of A in ELL
[in]dcolindmagmaIndex_ptr columnindices of A in ELL
[in]dxmagmaDoubleComplex_ptr input vector x
[in]betamagmaDoubleComplex scalar multiplier
[out]dymagmaDoubleComplex_ptr input/output vector y
[in]queuemagma_queue_t Queue to execute in.
magma_int_t magma_zgemvmdot ( int  n,
int  k,
magmaDoubleComplex_ptr  v,
magmaDoubleComplex_ptr  r,
magmaDoubleComplex_ptr  d1,
magmaDoubleComplex_ptr  d2,
magmaDoubleComplex_ptr  skp,
magma_queue_t  queue 
)

This is an extension of the merged dot product above by chunking the set of vectors v_i such that the data always fits into cache.

It is equivalent to a matrix vecor product Vr where V contains few rows and many columns. The computation is the same:

skp = ( <v_0,r>, <v_1,r>, .. )

Returns the vector skp.

Parameters
[in]nint length of v_i and r
[in]kint

vectors v_i

Parameters
[in]vmagmaDoubleComplex_ptr v = (v_0 .. v_i.. v_k)
[in]rmagmaDoubleComplex_ptr r
[in]d1magmaDoubleComplex_ptr workspace
[in]d2magmaDoubleComplex_ptr workspace
[out]skpmagmaDoubleComplex_ptr vector[k] of scalar products (<v_i,r>...)
[in]queuemagma_queue_t Queue to execute in.
magma_int_t magma_zjacobi_diagscal ( int  num_rows,
magma_z_vector  d,
magma_z_vector  b,
magma_z_vector *  c,
magma_queue_t  queue 
)

Prepares the Jacobi Iteration according to x^(k+1) = D^(-1) * b - D^(-1) * (L+U) * x^k x^(k+1) = c - M * x^k.

Returns the vector c. It calls a GPU kernel

Parameters
[in]num_rowsmagma_int_t number of rows
[in]bmagma_z_vector RHS b
[in]dmagma_z_vector vector with diagonal entries
[out]cmagma_z_vector* c = D^(-1) * b
[in]queuemagma_queue_t Queue to execute in.
magma_int_t magma_zjacobiiter ( magma_z_sparse_matrix  M,
magma_z_vector  c,
magma_z_vector *  x,
magma_z_solver_par *  solver_par,
magma_queue_t  queue 
)

Iterates the solution approximation according to x^(k+1) = D^(-1) * b - D^(-1) * (L+U) * x^k x^(k+1) = c - M * x^k.

Parameters
[in]Mmagma_z_sparse_matrix input matrix M = D^(-1) * (L+U)
[in]cmagma_z_vector c = D^(-1) * b
[in,out]xmagma_z_vector* iteration vector x
[in,out]solver_parmagma_z_solver_par* solver parameters
[in]queuemagma_queue_t Queue to execute in.
magma_int_t magma_zjacobiiter_precond ( magma_z_sparse_matrix  M,
magma_z_vector *  x,
magma_z_solver_par *  solver_par,
magma_z_preconditioner *  precond,
magma_queue_t  queue 
)

Iterates the solution approximation according to x^(k+1) = D^(-1) * b - D^(-1) * (L+U) * x^k x^(k+1) = c - M * x^k.

Parameters
[in]Mmagma_z_sparse_matrix input matrix M = D^(-1) * (L+U)
[in]cmagma_z_vector c = D^(-1) * b
[in,out]xmagma_z_vector* iteration vector x
[in,out]solver_parmagma_z_solver_par* solver parameters
[in]solver_parmagma_z_precond_par* precond parameters
[in]queuemagma_queue_t Queue to execute in.
magma_int_t magma_zjacobisetup ( magma_z_sparse_matrix  A,
magma_z_vector  b,
magma_z_sparse_matrix *  M,
magma_z_vector *  c,
magma_queue_t  queue 
)

Prepares the Jacobi Iteration according to x^(k+1) = D^(-1) * b - D^(-1) * (L+U) * x^k x^(k+1) = c - M * x^k.

Parameters
[in]Amagma_z_sparse_matrix input matrix A
[in]bmagma_z_vector RHS b
[in]Mmagma_z_sparse_matrix* M = D^(-1) * (L+U)
[in]cmagma_z_vector* c = D^(-1) * b
[in]queuemagma_queue_t Queue to execute in.
magma_int_t magma_zjacobisetup_diagscal ( magma_z_sparse_matrix  A,
magma_z_vector *  d,
magma_queue_t  queue 
)

It returns a vector d containing the inverse diagonal elements.

Parameters
[in]Amagma_z_sparse_matrix input matrix A
[in,out]dmagma_z_vector* vector with diagonal elements
[in]queuemagma_queue_t Queue to execute in.
magma_int_t magma_zjacobisetup_matrix ( magma_z_sparse_matrix  A,
magma_z_sparse_matrix *  M,
magma_z_vector *  d,
magma_queue_t  queue 
)

Prepares the Matrix M for the Jacobi Iteration according to x^(k+1) = D^(-1) * b - D^(-1) * (L+U) * x^k x^(k+1) = c - M * x^k.

It returns the preconditioner Matrix M and a vector d containing the diagonal elements.

Parameters
[in]Amagma_z_sparse_matrix input matrix A
[in]Mmagma_z_sparse_matrix* M = D^(-1) * (L+U)
[in,out]dmagma_z_vector* vector with diagonal elements of A
[in]queuemagma_queue_t Queue to execute in.
magma_int_t magma_zjacobisetup_vector ( magma_z_vector  b,
magma_z_vector  d,
magma_z_vector *  c,
magma_queue_t  queue 
)

Prepares the Jacobi Iteration according to x^(k+1) = D^(-1) * b - D^(-1) * (L+U) * x^k x^(k+1) = c - M * x^k.

Returns the vector c

Parameters
[in]bmagma_z_vector RHS b
[in]dmagma_z_vector vector with diagonal entries
[in]cmagma_z_vector* c = D^(-1) * b
[in]queuemagma_queue_t Queue to execute in.