single precision
[Sparse auxiliary]

Functions

magma_int_t magma_zcsrsplit (magma_int_t bsize, magma_z_sparse_matrix A, magma_z_sparse_matrix *D, magma_z_sparse_matrix *R)
 Splits a CSR matrix into two matrices, one containing the diagonal blocks with the diagonal element stored first, one containing the rest of the original matrix.
magma_int_t magma_s_spmv_shift (float alpha, magma_s_sparse_matrix A, float lambda, magma_s_vector x, float beta, magma_int_t offset, magma_int_t blocksize, magma_index_t *add_rows, magma_s_vector y)
 For a given input matrix A and vectors x, y and scalars alpha, beta the wrapper determines the suitable SpMV computing y = alpha * ( A - lambda I ) * x + beta * y.
magma_int_t magma_slobpcg_res (magma_int_t num_rows, magma_int_t num_vecs, float *evalues, float *X, float *R, float *res)
 This routine computes for Block-LOBPCG, the set of residuals.
magma_int_t magma_slobpcg_shift (magma_int_t num_rows, magma_int_t num_vecs, magma_int_t shift, float *x)
 For a Block-LOBPCG, the set of residuals (entries consecutive in memory) shrinks and the vectors are shifted in case shift residuals drop below threshold.
magma_int_t magma_scopyscale (int n, int k, float *r, float *v, float *skp)
 Computes the correction term of the pipelined GMRES according to P.

Function Documentation

magma_int_t magma_s_spmv_shift ( float  alpha,
magma_s_sparse_matrix  A,
float  lambda,
magma_s_vector  x,
float  beta,
magma_int_t  offset,
magma_int_t  blocksize,
magma_index_t *  add_rows,
magma_s_vector  y 
)

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

Parameters:
alpha float scalar alpha
A magma_s_sparse_matrix sparse matrix A
lambda float scalar lambda
x magma_s_vector input vector x
beta float scalar beta
offset magma_int_t in case not the main diagonal is scaled
blocksize magma_int_t in case of processing multiple vectors
add_rows magma_int_t* in case the matrixpowerskernel is used
y magma_s_vector output vector y
magma_int_t magma_scopyscale ( int  n,
int  k,
float *  r,
float *  v,
float *  skp 
)

Computes the correction term of the pipelined GMRES according to P.

Ghysels and scales and copies the new search direction

Returns the vector v = r/ ( skp[k] - (sum_i=1^k skp[i]^2) ) .

Parameters:
n int length of v_i
k int # skp entries v_i^T * r ( without r )
r float* vector of length n
v float* vector of length n
skp float* array of parameters
magma_int_t magma_slobpcg_res ( magma_int_t  num_rows,
magma_int_t  num_vecs,
float *  evalues,
float *  X,
float *  R,
float *  res 
)

This routine computes for Block-LOBPCG, the set of residuals.

R = Ax - x evalues It replaces: for(int i=0; i < n; i++){ magma_saxpy(m, MAGMA_S_MAKE(-evalues[i],0),blockX+i*m,1,blockR+i*m,1); } The memory layout of x is:

/ 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] /

Parameters:
num_rows magma_int_t number of rows
num_vecs magma_int_t number of vectors
evalues float* array of eigenvalues/approximations
X float* block of eigenvector approximations
R float* block of residuals
res float* array of residuals
magma_int_t magma_slobpcg_shift ( magma_int_t  num_rows,
magma_int_t  num_vecs,
magma_int_t  shift,
float *  x 
)

For a Block-LOBPCG, the set of residuals (entries consecutive in memory) shrinks and the vectors are shifted in case shift residuals drop below threshold.

The memory layout of x is:

/ x1[0] x2[0] x3[0] \ | x1[1] x2[1] x3[1] | x = | x1[2] x2[2] x3[2] | = x1[0] x2[0] x3[0] x1[1] x2[1] x3[1] x1[2] . | x1[3] x2[3] x3[3] | \ x1[4] x2[4] x3[4] /

Parameters:
num_rows magma_int_t number of rows
num_vecs magma_int_t number of vectors
shift magma_int_t shift number
x float* input/output vector x
magma_int_t magma_zcsrsplit ( magma_int_t  bsize,
magma_z_sparse_matrix  A,
magma_z_sparse_matrix *  D,
magma_z_sparse_matrix *  R 
)

Splits a CSR matrix into two matrices, one containing the diagonal blocks with the diagonal element stored first, one containing the rest of the original matrix.

Parameters:
bsize magma_int_t size of the diagonal blocks
A magma_z_sparse_matrix CSR input matrix
D magma_z_sparse_matrix* CSR matrix containing diagonal blocks
R magma_z_sparse_matrix* CSR matrix containing rest

Generated on 17 Sep 2014 for MAGMA by  doxygen 1.6.1