Functions | |
magma_int_t | magma_djacobisetup_matrix (magma_d_matrix A, magma_d_matrix *M, magma_d_matrix *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. | |
magma_int_t | magma_djacobisetup_diagscal (magma_d_matrix A, magma_d_matrix *d, magma_queue_t queue) |
It returns a vector d containing the inverse diagonal elements. | |
magma_int_t | magma_djacobisetup_vector (magma_d_matrix b, magma_d_matrix d, magma_d_matrix *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. | |
magma_int_t | magma_djacobisetup (magma_d_matrix A, magma_d_matrix b, magma_d_matrix *M, magma_d_matrix *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. | |
magma_int_t | magma_djacobiiter (magma_d_matrix M, magma_d_matrix c, magma_d_matrix *x, magma_d_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. | |
magma_int_t | magma_djacobiiter_precond (magma_d_matrix M, magma_d_matrix *x, magma_d_solver_par *solver_par, magma_d_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. | |
magma_int_t | magma_djacobiiter_sys (magma_d_matrix A, magma_d_matrix b, magma_d_matrix d, magma_d_matrix t, magma_d_matrix *x, magma_d_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. | |
magma_int_t | magma_dcompactActive (magma_int_t m, magma_int_t n, magmaDouble_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). | |
magma_int_t | magma_dgeelltmv (magma_trans_t transA, magma_int_t m, magma_int_t n, magma_int_t nnz_per_row, double alpha, magmaDouble_ptr dval, magmaIndex_ptr dcolind, magmaDouble_ptr dx, double beta, magmaDouble_ptr dy, magma_queue_t queue) |
This routine computes y = alpha * A^t * x + beta * y on the GPU. | |
magma_int_t | magma_djacobi_diagscal (int num_rows, magma_d_matrix d, magma_d_matrix b, magma_d_matrix *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. | |
magma_int_t | magma_djacobiupdate (magma_d_matrix t, magma_d_matrix b, magma_d_matrix d, magma_d_matrix *x, magma_queue_t queue) |
Updates the iteration vector x for the Jacobi iteration according to x=x+d. | |
magma_int_t | magma_djacobispmvupdate (magma_int_t maxiter, magma_d_matrix A, magma_d_matrix t, magma_d_matrix b, magma_d_matrix d, magma_d_matrix *x, magma_queue_t queue) |
Updates the iteration vector x for the Jacobi iteration according to x=x+d. | |
magma_int_t | magma_djacobispmvupdateselect (magma_int_t maxiter, magma_int_t num_updates, magma_index_t *indices, magma_d_matrix A, magma_d_matrix t, magma_d_matrix b, magma_d_matrix d, magma_d_matrix tmp, magma_d_matrix *x, magma_queue_t queue) |
Updates the iteration vector x for the Jacobi iteration according to x=x+d. | |
magma_int_t | magma_dgemvmdot (int n, int k, magmaDouble_ptr v, magmaDouble_ptr r, magmaDouble_ptr d1, magmaDouble_ptr d2, magmaDouble_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. | |
magma_int_t | magma_d_spmv (double alpha, magma_d_matrix A, magma_d_matrix x, double beta, magma_d_matrix 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. | |
magma_int_t | magma_d_spmm (double alpha, magma_d_matrix A, magma_d_matrix B, magma_d_matrix *C, magma_queue_t queue) |
For a given input matrix A and B and scalar alpha, the wrapper determines the suitable SpMV computing C = alpha * A * B. |
magma_int_t magma_d_spmm | ( | double | alpha, | |
magma_d_matrix | A, | |||
magma_d_matrix | B, | |||
magma_d_matrix * | C, | |||
magma_queue_t | queue | |||
) |
For a given input matrix A and B and scalar alpha, the wrapper determines the suitable SpMV computing C = alpha * A * B.
[in] | alpha | double scalar alpha |
[in] | A | magma_d_matrix sparse matrix A |
[in] | B | magma_d_matrix sparse matrix C |
[out] | C | magma_d_matrix * outpur sparse matrix C |
[in] | queue | magma_queue_t Queue to execute in. |
magma_int_t magma_d_spmv | ( | double | alpha, | |
magma_d_matrix | A, | |||
magma_d_matrix | x, | |||
double | beta, | |||
magma_d_matrix | 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.
[in] | alpha | double scalar alpha |
[in] | A | magma_d_matrix sparse matrix A |
[in] | x | magma_d_matrix input vector x |
[in] | beta | double scalar beta |
[out] | y | magma_d_matrix output vector y |
[in] | queue | magma_queue_t Queue to execute in. |
magma_int_t magma_dcompactActive | ( | magma_int_t | m, | |
magma_int_t | n, | |||
magmaDouble_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).
[in] | m | INTEGER The number of rows of the matrix dA. M >= 0. |
[in] | n | INTEGER 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] | ldda | INTEGER The leading dimension of the array dA. LDDA >= max(1,M). |
[in] | active | INTEGER array, dimension N A mask of 1s and 0s showing if a vector remains or has been removed |
[in] | queue | magma_queue_t Queue to execute in. |
magma_int_t magma_dgeelltmv | ( | magma_trans_t | transA, | |
magma_int_t | m, | |||
magma_int_t | n, | |||
magma_int_t | nnz_per_row, | |||
double | alpha, | |||
magmaDouble_ptr | dval, | |||
magmaIndex_ptr | dcolind, | |||
magmaDouble_ptr | dx, | |||
double | beta, | |||
magmaDouble_ptr | dy, | |||
magma_queue_t | queue | |||
) |
This routine computes y = alpha * A^t * x + beta * y on the GPU.
Input format is ELL.
[in] | transA | magma_trans_t transposition parameter for A |
[in] | m | magma_int_t number of rows in A |
[in] | n | magma_int_t number of columns in A |
[in] | nnz_per_row | magma_int_t number of elements in the longest row |
[in] | alpha | double scalar multiplier |
[in] | dval | magmaDouble_ptr array containing values of A in ELL |
[in] | dcolind | magmaIndex_ptr columnindices of A in ELL |
[in] | dx | magmaDouble_ptr input vector x |
[in] | beta | double scalar multiplier |
[out] | dy | magmaDouble_ptr input/output vector y |
[in] | queue | magma_queue_t Queue to execute in. |
magma_int_t magma_dgemvmdot | ( | int | n, | |
int | k, | |||
magmaDouble_ptr | v, | |||
magmaDouble_ptr | r, | |||
magmaDouble_ptr | d1, | |||
magmaDouble_ptr | d2, | |||
magmaDouble_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.
[in] | n | int length of v_i and r |
[in] | k | int # vectors v_i |
[in] | v | magmaDouble_ptr v = (v_0 .. v_i.. v_k) |
[in] | r | magmaDouble_ptr r |
[in] | d1 | magmaDouble_ptr workspace |
[in] | d2 | magmaDouble_ptr workspace |
[out] | skp | magmaDouble_ptr vector[k] of scalar products (<v_i,r>...) |
[in] | queue | magma_queue_t Queue to execute in. |
magma_int_t magma_djacobi_diagscal | ( | int | num_rows, | |
magma_d_matrix | d, | |||
magma_d_matrix | b, | |||
magma_d_matrix * | 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
[in] | num_rows | magma_int_t number of rows |
[in] | b | magma_d_matrix RHS b |
[in] | d | magma_d_matrix vector with diagonal entries |
[out] | c | magma_d_matrix* c = D^(-1) * b |
[in] | queue | magma_queue_t Queue to execute in. |
magma_int_t magma_djacobiiter | ( | magma_d_matrix | M, | |
magma_d_matrix | c, | |||
magma_d_matrix * | x, | |||
magma_d_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.
This routine takes the iteration matrix M as input.
[in] | M | magma_d_matrix input matrix M = D^(-1) * (L+U) |
[in] | c | magma_d_matrix c = D^(-1) * b |
[in,out] | x | magma_d_matrix* iteration vector x |
[in,out] | solver_par | magma_d_solver_par* solver parameters |
[in] | queue | magma_queue_t Queue to execute in. |
magma_int_t magma_djacobiiter_precond | ( | magma_d_matrix | M, | |
magma_d_matrix * | x, | |||
magma_d_solver_par * | solver_par, | |||
magma_d_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.
[in] | M | magma_d_matrix input matrix M = D^(-1) * (L+U) |
[in] | c | magma_d_matrix c = D^(-1) * b |
[in,out] | x | magma_d_matrix* iteration vector x |
[in,out] | solver_par | magma_d_solver_par* solver parameters |
[in] | solver_par | magma_d_precond_par* precond parameters |
[in] | queue | magma_queue_t Queue to execute in. |
magma_int_t magma_djacobiiter_sys | ( | magma_d_matrix | A, | |
magma_d_matrix | b, | |||
magma_d_matrix | d, | |||
magma_d_matrix | t, | |||
magma_d_matrix * | x, | |||
magma_d_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.
This routine takes the system matrix A and the RHS b as input.
[in] | M | magma_d_matrix input matrix M = D^(-1) * (L+U) |
[in] | c | magma_d_matrix c = D^(-1) * b |
[in,out] | x | magma_d_matrix* iteration vector x |
[in,out] | solver_par | magma_d_solver_par* solver parameters |
[in] | queue | magma_queue_t Queue to execute in. |
magma_int_t magma_djacobisetup | ( | magma_d_matrix | A, | |
magma_d_matrix | b, | |||
magma_d_matrix * | M, | |||
magma_d_matrix * | 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.
[in] | A | magma_d_matrix input matrix A |
[in] | b | magma_d_matrix RHS b |
[in] | M | magma_d_matrix* M = D^(-1) * (L+U) |
[in] | c | magma_d_matrix* c = D^(-1) * b |
[in] | queue | magma_queue_t Queue to execute in. |
magma_int_t magma_djacobisetup_diagscal | ( | magma_d_matrix | A, | |
magma_d_matrix * | d, | |||
magma_queue_t | queue | |||
) |
It returns a vector d containing the inverse diagonal elements.
[in] | A | magma_d_matrix input matrix A |
[in,out] | d | magma_d_matrix* vector with diagonal elements |
[in] | queue | magma_queue_t Queue to execute in. |
magma_int_t magma_djacobisetup_matrix | ( | magma_d_matrix | A, | |
magma_d_matrix * | M, | |||
magma_d_matrix * | 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.
[in] | A | magma_d_matrix input matrix A |
[in] | M | magma_d_matrix* M = D^(-1) * (L+U) |
[in,out] | d | magma_d_matrix* vector with diagonal elements of A |
[in] | queue | magma_queue_t Queue to execute in. |
magma_int_t magma_djacobisetup_vector | ( | magma_d_matrix | b, | |
magma_d_matrix | d, | |||
magma_d_matrix * | 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
[in] | b | magma_d_matrix RHS b |
[in] | d | magma_d_matrix vector with diagonal entries |
[in] | c | magma_d_matrix* c = D^(-1) * b |
[in] | queue | magma_queue_t Queue to execute in. |
magma_int_t magma_djacobispmvupdate | ( | magma_int_t | maxiter, | |
magma_d_matrix | A, | |||
magma_d_matrix | t, | |||
magma_d_matrix | b, | |||
magma_d_matrix | d, | |||
magma_d_matrix * | x, | |||
magma_queue_t | queue | |||
) |
Updates the iteration vector x for the Jacobi iteration according to x=x+d.
*(b-Ax)
[in] | maxiter | magma_int_t number of Jacobi iterations |
[in] | A | magma_d_matrix system matrix |
[in] | t | magma_d_matrix workspace |
[in] | b | magma_d_matrix RHS b |
[in] | d | magma_d_matrix vector with diagonal entries |
[out] | x | magma_d_matrix* iteration vector |
[in] | queue | magma_queue_t Queue to execute in. |
magma_int_t magma_djacobispmvupdateselect | ( | magma_int_t | maxiter, | |
magma_int_t | num_updates, | |||
magma_index_t * | indices, | |||
magma_d_matrix | A, | |||
magma_d_matrix | t, | |||
magma_d_matrix | b, | |||
magma_d_matrix | d, | |||
magma_d_matrix | tmp, | |||
magma_d_matrix * | x, | |||
magma_queue_t | queue | |||
) |
Updates the iteration vector x for the Jacobi iteration according to x=x+d.
*(b-Ax)
This kernel allows for overlapping domains: the indices-array contains the locations that are updated. Locations may be repeated to simulate overlapping domains.
[in] | maxiter | magma_int_t number of Jacobi iterations |
[in] | num_updates | magma_int_t number of updates - length of the indices array |
[in] | indices | magma_index_t* indices, which entries of x to update |
[in] | A | magma_d_matrix system matrix |
[in] | t | magma_d_matrix workspace |
[in] | b | magma_d_matrix RHS b |
[in] | d | magma_d_matrix vector with diagonal entries |
[in] | tmp | magma_d_matrix workspace |
[out] | x | magma_d_matrix* iteration vector |
[in] | queue | magma_queue_t Queue to execute in. |
magma_int_t magma_djacobiupdate | ( | magma_d_matrix | t, | |
magma_d_matrix | b, | |||
magma_d_matrix | d, | |||
magma_d_matrix * | x, | |||
magma_queue_t | queue | |||
) |
Updates the iteration vector x for the Jacobi iteration according to x=x+d.
*(b-t) where d is the diagonal of the system matrix A and t=Ax.
[in] | num_rows | magma_int_t number of rows |
[in] | num_cols | magma_int_t number of cols |
[in] | t | magma_d_matrix t = A*x |
[in] | b | magma_d_matrix RHS b |
[in] | d | magma_d_matrix vector with diagonal entries |
[out] | x | magma_d_matrix* iteration vector |
[in] | queue | magma_queue_t Queue to execute in. |