Functions | |
magma_int_t | magma_cbajac_csr (magma_int_t localiters, magma_c_sparse_matrix D, magma_c_sparse_matrix R, magma_c_vector b, magma_c_vector *x) |
This routine is a block-asynchronous Jacobi iteration performing s local Jacobi-updates within the block. | |
magma_int_t | magma_cbcsrvalcpy (magma_int_t size_b, magma_int_t num_blocks, magma_int_t num_zblocks, magmaFloatComplex **Aval, magmaFloatComplex **Bval, magmaFloatComplex **Bval2) |
For a Block-CSR ILU factorization, this routine copies the filled blocks from the original matrix A and initializes the blocks that will later be filled in the factorization process with zeros. | |
magma_int_t | magma_cbcsrluegemm (magma_int_t size_b, magma_int_t num_brows, magma_int_t kblocks, magmaFloatComplex **dA, magmaFloatComplex **dB, magmaFloatComplex **dC) |
For a Block-CSR ILU factorization, this routine updates all blocks in the trailing matrix. | |
magma_int_t | magma_cbcsrlupivloc (magma_int_t size_b, magma_int_t kblocks, magmaFloatComplex **dA, magma_int_t *ipiv) |
For a Block-CSR ILU factorization, this routine updates all blocks in the trailing matrix. | |
magma_int_t | magma_cbcsrswp (magma_int_t r_blocks, magma_int_t size_b, magma_int_t *ipiv, magmaFloatComplex *x) |
For a Block-CSR ILU factorization, this routine swaps rows in the vector *x according to the pivoting in *ipiv. | |
magma_int_t | magma_cbcsrtrsv (magma_uplo_t uplo, magma_int_t r_blocks, magma_int_t c_blocks, magma_int_t size_b, magmaFloatComplex *A, magma_index_t *blockinfo, magmaFloatComplex *x) |
For a Block-CSR ILU factorization, this routine performs the triangular solves. | |
void | magma_ccompact (magma_int_t m, magma_int_t n, magmaFloatComplex *dA, magma_int_t ldda, float *dnorms, float tol, magma_index_t *active, magma_index_t *cBlock) |
ZCOMPACT takes a set of n vectors of size m (in dA) and their norms and compacts them into the cBlock size<=n vectors that have norms > tol. | |
magma_int_t | magma_cjacobisetup_vector_gpu (int num_rows, magmaFloatComplex *b, magmaFloatComplex *d, magmaFloatComplex *c, magmaFloatComplex *x) |
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_clobpcg_maxpy (magma_int_t num_rows, magma_int_t num_vecs, magmaFloatComplex *X, magmaFloatComplex *Y) |
This routine computes a axpy for a mxn matrix:. | |
int | magma_cbicgmerge1 (int n, magmaFloatComplex *skp, magmaFloatComplex *v, magmaFloatComplex *r, magmaFloatComplex *p) |
Mergels multiple operations into one kernel:. | |
int | magma_cbicgmerge2 (int n, magmaFloatComplex *skp, magmaFloatComplex *r, magmaFloatComplex *v, magmaFloatComplex *s) |
Mergels multiple operations into one kernel:. | |
int | magma_cbicgmerge3 (int n, magmaFloatComplex *skp, magmaFloatComplex *p, magmaFloatComplex *s, magmaFloatComplex *t, magmaFloatComplex *x, magmaFloatComplex *r) |
Mergels multiple operations into one kernel:. | |
int | magma_cbicgmerge4 (int type, magmaFloatComplex *skp) |
Performs some parameter operations for the BiCGSTAB with scalars on GPU. | |
magma_int_t | magma_cbicgmerge_spmv1 (magma_c_sparse_matrix A, magmaFloatComplex *d1, magmaFloatComplex *d2, magmaFloatComplex *d_p, magmaFloatComplex *d_r, magmaFloatComplex *d_v, magmaFloatComplex *skp) |
Merges the first SpmV using CSR with the dot product and the computation of alpha. | |
magma_int_t | magma_cbicgmerge_spmv2 (magma_c_sparse_matrix A, magmaFloatComplex *d1, magmaFloatComplex *d2, magmaFloatComplex *d_s, magmaFloatComplex *d_t, magmaFloatComplex *skp) |
Merges the second SpmV using CSR with the dot product and the computation of omega. | |
magma_int_t | magma_cbicgmerge_xrbeta (int n, magmaFloatComplex *d1, magmaFloatComplex *d2, magmaFloatComplex *rr, magmaFloatComplex *r, magmaFloatComplex *p, magmaFloatComplex *s, magmaFloatComplex *t, magmaFloatComplex *x, magmaFloatComplex *skp) |
Merges the second SpmV using CSR with the dot product and the computation of omega. | |
magma_int_t | magma_ccgmerge_spmv1 (magma_c_sparse_matrix A, magmaFloatComplex *d1, magmaFloatComplex *d2, magmaFloatComplex *d_d, magmaFloatComplex *d_z, magmaFloatComplex *skp) |
Merges the first SpmV using different formats with the dot product and the computation of rho. |
magma_int_t magma_cbajac_csr | ( | magma_int_t | localiters, | |
magma_c_sparse_matrix | D, | |||
magma_c_sparse_matrix | R, | |||
magma_c_vector | b, | |||
magma_c_vector * | x | |||
) |
This routine is a block-asynchronous Jacobi iteration performing s local Jacobi-updates within the block.
Input format is two CSR matrices, one containing the diagonal blocks, one containing the rest.
localiters | magma_int_t number of local Jacobi-like updates | |
D | magma_c_sparse_matrix input matrix with diagonal blocks | |
R | magma_c_sparse_matrix input matrix with non-diagonal parts | |
b | magma_c_vector RHS | |
x | magma_c_vector* iterate/solution |
magma_int_t magma_cbcsrluegemm | ( | magma_int_t | size_b, | |
magma_int_t | num_brows, | |||
magma_int_t | kblocks, | |||
magmaFloatComplex ** | dA, | |||
magmaFloatComplex ** | dB, | |||
magmaFloatComplex ** | dC | |||
) |
For a Block-CSR ILU factorization, this routine updates all blocks in the trailing matrix.
size_b | magma_int_t blocksize in BCSR | |
num_brows | magma_int_t number of block rows | |
kblocks | magma_int_t number of blocks in row | |
dA | magmaFloatComplex** input blocks of matrix A | |
dB | magmaFloatComplex** input blocks of matrix B | |
dC | magmaFloatComplex** output blocks of matrix C |
magma_int_t magma_cbcsrlupivloc | ( | magma_int_t | size_b, | |
magma_int_t | kblocks, | |||
magmaFloatComplex ** | dA, | |||
magma_int_t * | ipiv | |||
) |
For a Block-CSR ILU factorization, this routine updates all blocks in the trailing matrix.
size_b | magma_int_t blocksize in BCSR | |
kblocks | magma_int_t number of blocks | |
dA | magmaFloatComplex** matrix in BCSR | |
ipiv | magma_int_t* array containing pivots |
magma_int_t magma_cbcsrswp | ( | magma_int_t | r_blocks, | |
magma_int_t | size_b, | |||
magma_int_t * | ipiv, | |||
magmaFloatComplex * | x | |||
) |
For a Block-CSR ILU factorization, this routine swaps rows in the vector *x according to the pivoting in *ipiv.
r_blocks | magma_int_t number of blocks | |
size_b | magma_int_t blocksize in BCSR | |
ipiv | magma_int_t* array containing pivots | |
x | magmaFloatComplex* input/output vector x |
magma_int_t magma_cbcsrtrsv | ( | magma_uplo_t | uplo, | |
magma_int_t | r_blocks, | |||
magma_int_t | c_blocks, | |||
magma_int_t | size_b, | |||
magmaFloatComplex * | A, | |||
magma_index_t * | blockinfo, | |||
magmaFloatComplex * | x | |||
) |
For a Block-CSR ILU factorization, this routine performs the triangular solves.
uplo | magma_uplo_t upper/lower fill structure | |
r_blocks | magma_int_t number of blocks in row | |
c_blocks | magma_int_t number of blocks in column | |
size_b | magma_int_t blocksize in BCSR | |
A | magmaFloatComplex* upper/lower factor | |
blockinfo | magma_int_t* array containing matrix information | |
x | magmaFloatComplex* input/output vector x |
magma_int_t magma_cbcsrvalcpy | ( | magma_int_t | size_b, | |
magma_int_t | num_blocks, | |||
magma_int_t | num_zblocks, | |||
magmaFloatComplex ** | Aval, | |||
magmaFloatComplex ** | Bval, | |||
magmaFloatComplex ** | Bval2 | |||
) |
For a Block-CSR ILU factorization, this routine copies the filled blocks from the original matrix A and initializes the blocks that will later be filled in the factorization process with zeros.
size_b | magma_int_t blocksize in BCSR | |
num_blocks | magma_int_t number of nonzero blocks | |
num_zblocks | magma_int_t number of zero-blocks (will later be filled) | |
Aval | magmaFloatComplex** pointers to the nonzero blocks in A | |
Bval | magmaFloatComplex** pointers to the nonzero blocks in B | |
Bval2 | magmaFloatComplex** pointers to the zero blocks in B |
int magma_cbicgmerge1 | ( | int | n, | |
magmaFloatComplex * | skp, | |||
magmaFloatComplex * | v, | |||
magmaFloatComplex * | r, | |||
magmaFloatComplex * | p | |||
) |
Mergels multiple operations into one kernel:.
p = beta*p p = p-omega*beta*v p = p+r
-> p = r + beta * ( p - omega * v )
n | int dimension n | |
skp | magmaFloatComplex* set of scalar parameters | |
v | magmaFloatComplex* input v | |
r | magmaFloatComplex* input r | |
p | magmaFloatComplex* input/output p |
int magma_cbicgmerge2 | ( | int | n, | |
magmaFloatComplex * | skp, | |||
magmaFloatComplex * | r, | |||
magmaFloatComplex * | v, | |||
magmaFloatComplex * | s | |||
) |
Mergels multiple operations into one kernel:.
s=r s=s-alpha*v
-> s = r - alpha * v
n | int dimension n | |
skp | magmaFloatComplex* set of scalar parameters | |
r | magmaFloatComplex* input r | |
v | magmaFloatComplex* input v | |
s | magmaFloatComplex* input/output s |
int magma_cbicgmerge3 | ( | int | n, | |
magmaFloatComplex * | skp, | |||
magmaFloatComplex * | p, | |||
magmaFloatComplex * | s, | |||
magmaFloatComplex * | t, | |||
magmaFloatComplex * | x, | |||
magmaFloatComplex * | r | |||
) |
Mergels multiple operations into one kernel:.
x=x+alpha*p x=x+omega*s r=s r=r-omega*t
-> x = x + alpha * p + omega * s -> r = s - omega * t
n | int dimension n | |
skp | magmaFloatComplex* set of scalar parameters | |
p | magmaFloatComplex* input p | |
s | magmaFloatComplex* input s | |
t | magmaFloatComplex* input t | |
x | magmaFloatComplex* input/output x | |
r | magmaFloatComplex* input/output r |
int magma_cbicgmerge4 | ( | int | type, | |
magmaFloatComplex * | skp | |||
) |
Performs some parameter operations for the BiCGSTAB with scalars on GPU.
type | int kernel type | |
skp | magmaFloatComplex* vector with parameters |
magma_int_t magma_cbicgmerge_spmv1 | ( | magma_c_sparse_matrix | A, | |
magmaFloatComplex * | d1, | |||
magmaFloatComplex * | d2, | |||
magmaFloatComplex * | d_p, | |||
magmaFloatComplex * | d_r, | |||
magmaFloatComplex * | d_v, | |||
magmaFloatComplex * | skp | |||
) |
Merges the first SpmV using CSR with the dot product and the computation of alpha.
A | magma_c_sparse_matrix system matrix | |
d1 | magmaFloatComplex* temporary vector | |
d2 | magmaFloatComplex* temporary vector | |
d_p | magmaFloatComplex* input vector p | |
d_r | magmaFloatComplex* input vector r | |
d_v | magmaFloatComplex* output vector v | |
skp | magmaFloatComplex* array for parameters ( skp[0]=alpha ) |
magma_int_t magma_cbicgmerge_spmv2 | ( | magma_c_sparse_matrix | A, | |
magmaFloatComplex * | d1, | |||
magmaFloatComplex * | d2, | |||
magmaFloatComplex * | d_s, | |||
magmaFloatComplex * | d_t, | |||
magmaFloatComplex * | skp | |||
) |
Merges the second SpmV using CSR with the dot product and the computation of omega.
A | magma_c_sparse_matrix input matrix | |
d1 | magmaFloatComplex* temporary vector | |
d2 | magmaFloatComplex* temporary vector | |
d_s | magmaFloatComplex* input vector s | |
d_t | magmaFloatComplex* output vector t | |
skp | magmaFloatComplex* array for parameters |
magma_int_t magma_cbicgmerge_xrbeta | ( | int | n, | |
magmaFloatComplex * | d1, | |||
magmaFloatComplex * | d2, | |||
magmaFloatComplex * | rr, | |||
magmaFloatComplex * | r, | |||
magmaFloatComplex * | p, | |||
magmaFloatComplex * | s, | |||
magmaFloatComplex * | t, | |||
magmaFloatComplex * | x, | |||
magmaFloatComplex * | skp | |||
) |
Merges the second SpmV using CSR with the dot product and the computation of omega.
n | int dimension n | |
d1 | magmaFloatComplex* temporary vector | |
d2 | magmaFloatComplex* temporary vector | |
rr | magmaFloatComplex* input vector rr | |
r | magmaFloatComplex* input/output vector r | |
p | magmaFloatComplex* input vector p | |
s | magmaFloatComplex* input vector s | |
t | magmaFloatComplex* input vector t | |
x | magmaFloatComplex* output vector x | |
skp | magmaFloatComplex* array for parameters |
magma_int_t magma_ccgmerge_spmv1 | ( | magma_c_sparse_matrix | A, | |
magmaFloatComplex * | d1, | |||
magmaFloatComplex * | d2, | |||
magmaFloatComplex * | d_d, | |||
magmaFloatComplex * | d_z, | |||
magmaFloatComplex * | skp | |||
) |
Merges the first SpmV using different formats with the dot product and the computation of rho.
A | magma_c_sparse_matrix input matrix | |
d1 | magmaFloatComplex* temporary vector | |
d2 | magmaFloatComplex* temporary vector | |
d_d | magmaFloatComplex* input vector d | |
d_z | magmaFloatComplex* input vector z | |
skp | magmaFloatComplex* array for parameters ( skp[3]=rho ) |
void magma_ccompact | ( | magma_int_t | m, | |
magma_int_t | n, | |||
magmaFloatComplex * | dA, | |||
magma_int_t | ldda, | |||
float * | dnorms, | |||
float | tol, | |||
magma_index_t * | active, | |||
magma_index_t * | cBlock | |||
) |
ZCOMPACT takes a set of n vectors of size m (in dA) and their norms and compacts them into the cBlock size<=n vectors that have norms > tol.
The active mask array has 1 or 0, showing if a vector remained or not in the compacted resulting set of vectors.
[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,out] | dA | COMPLEX REAL 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] | dnorms | REAL array, dimension N The norms of the N vectors in dA |
[in] | tol | DOUBLE PRECISON The tolerance value used in the criteria to compact or not. |
[out] | active | INTEGER array, dimension N A mask of 1s and 0s showing if a vector remains or has been removed |
[out] | cBlock | magma_index_t* The number of vectors that remain in dA (i.e., with norms > tol). |
magma_int_t magma_cjacobisetup_vector_gpu | ( | int | num_rows, | |
magmaFloatComplex * | b, | |||
magmaFloatComplex * | d, | |||
magmaFloatComplex * | c, | |||
magmaFloatComplex * | x | |||
) |
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
num_rows | magma_int_t number of rows | |
b | magma_c_vector RHS b | |
d | magma_c_vector vector with diagonal entries | |
c | magma_c_vector* c = D^(-1) * b | |
x | magma_c_vector* iteration vector |
magma_int_t magma_clobpcg_maxpy | ( | magma_int_t | num_rows, | |
magma_int_t | num_vecs, | |||
magmaFloatComplex * | X, | |||
magmaFloatComplex * | Y | |||
) |
This routine computes a axpy for a mxn matrix:.
Y = X + Y
It replaces: magma_caxpy(m*n, c_one, Y, 1, X, 1);
/ x1[0] x2[0] x3[0] \ | x1[1] x2[1] x3[1] | X = | x1[2] x2[2] x3[2] | = x1[0] x1[1] x1[2] x1[3] x1[4] x2[0] x2[1] . | x1[3] x2[3] x3[3] | \ x1[4] x2[4] x3[4] /
num_rows | magma_int_t number of rows | |
num_vecs | magma_int_t number of vectors | |
X | magmaFloatComplex* input vector X | |
Y | magmaFloatComplex* input/output vector Y |