21int main(
int argc,
char **argv )
34#if defined(SPM_WITH_MPI)
35 MPI_Init( &argc, &argv );
63 fprintf( stdout,
" || A ||_f: %e\n", norm );
81 rc =
spmGenVec( SpmRhsRndX, &spm, &alpha, 24356, x, 1 );
106 epsilon = epsilon * spm.
nnzexp / spm.
gN;
107 rc =
spmCheckAxb( epsilon, 1, &spm, NULL, 1, b, ldb, x, ldx );
113#if defined(SPM_WITH_MPI)
static size_t spm_size_of(spm_coeftype_t type)
Double datatype that is not converted through precision generator functions.
void spmExit(spmatrix_t *spm)
Cleanup the spm structure but do not free the spm pointer.
int spm_int_t
The main integer datatype used in spm arrays.
int spmMatVec(spm_trans_t trans, double alpha, const spmatrix_t *spm, const void *x, double beta, void *y)
Compute a matrix-vector product.
int spmCheckAxb(double eps, spm_int_t nrhs, const spmatrix_t *spm, void *opt_X0, spm_int_t opt_ldx0, void *B, spm_int_t ldb, const void *X, spm_int_t ldx)
Check the backward error, and the forward error if x0 is provided.
void spmGenFakeValues(spmatrix_t *spm)
Generate the fake values array such that .
int spmReadDriver(spm_driver_t driver, const char *filename, spmatrix_t *spm)
Import a matrix file into a spm structure.
void spmScal(double alpha, spmatrix_t *spm)
Scale the spm.
int spmGenVec(spm_rhstype_t type, const spmatrix_t *spm, void *alpha, unsigned long long int seed, void *x, spm_int_t incx)
Generate a vector associated to a given matrix.
double spmNorm(spm_normtype_t ntype, const spmatrix_t *spm)
Compute the norm of the spm.
void spmPrintInfo(const spmatrix_t *spm, FILE *f)
Print basic informations about the spm matrix into a given stream.
The sparse matrix data structure.