SpM Handbook 1.2.4
Loading...
Searching...
No Matches
d_spm.h File Reference

Go to the source code of this file.

Functions

void d_spmIntFltSortAsc (void **const pbase, const spm_int_t n)
 Integer routines.
 
void d_spmIntIntFltSortAsc (void **const pbase, const spm_int_t n)
 Sort 2 arrays simultaneously, the first array is an array of spm_int_t and used as key for sorting. The second array is an array of double.
 
int d_spmConvertCSC2CSR (spmatrix_t *spm)
 convert a matrix in CSC format to a matrix in CSR format.
 
int d_spmConvertCSC2IJV (spmatrix_t *spm)
 Convert a matrix in CSC format to a matrix in IJV format.
 
int d_spmConvertCSR2CSC (spmatrix_t *spm)
 convert a matrix in CSR format to a matrix in CSC format.
 
int d_spmConvertCSR2IJV (spmatrix_t *spm)
 convert a matrix in CSR format to a matrix in IJV format.
 
int d_spmConvertIJV2CSC (spmatrix_t *spm)
 convert a matrix in IJV format to a matrix in CSC format.
 
int d_spmConvertIJV2CSR (spmatrix_t *spm)
 convert a matrix in IJV format to a matrix in CSR format.
 
void d_spm2dense (const spmatrix_t *spm, double *A)
 Convert a sparse matrix into a dense matrix.
 
int spm_dspmv (spm_trans_t trans, double alpha, const spmatrix_t *A, const double *x, spm_int_t incx, double beta, double *y, spm_int_t incy)
 compute the matrix-vector product:
 
int spm_dspmm (spm_side_t side, spm_trans_t transA, spm_trans_t transB, spm_int_t K, double alpha, const spmatrix_t *A, const double *B, spm_int_t ldb, double beta, double *C, spm_int_t ldc)
 Compute a matrix-matrix product.
 
double d_spmNorm (spm_normtype_t ntype, const spmatrix_t *spm)
 Compute the norm of an spm matrix.
 
double d_spmNormMat (spm_normtype_t ntype, const spmatrix_t *spm, spm_int_t n, const double *A, spm_int_t lda)
 Compute the norm of a dense matrix that follows the distribution of an spm matrix.
 
void d_spmSort (spmatrix_t *spm)
 This routine sorts the spm matrix.
 
spm_int_t d_spmMergeDuplicate (spmatrix_t *spm)
 This routine merge the multiple entries in a sparse matrix by summing their values together.
 
int d_spmGenRHS (spm_rhstype_t type, int nrhs, const spmatrix_t *spm, void *x, int ldx, void *b, int ldb)
 Generate nrhs right hand side vectors associated to a given matrix to test a problem with a solver.
 
int d_spmGenMat (spm_rhstype_t type, int nrhs, const spmatrix_t *spm, void *alphaptr, unsigned long long int seed, void *A, int lda)
 Generate nrhs right hand side vectors associated to a given matrix to test a problem with a solver.
 
int d_spmCheckAxb (spm_fixdbl_t eps, int nrhs, const spmatrix_t *spm, void *x0, int ldx0, void *b, int ldb, const void *x, int ldx)
 Check the backward error, and the forward error if x0 is provided.
 
void d_spmGatherRHS (int nrhs, const spmatrix_t *spm, const double *x, spm_int_t ldx, int root, double *gx, spm_int_t ldgx)
 Gather all the global C coefficients and store the good ones in local.
 
void d_spmReduceRHS (int nrhs, const spmatrix_t *spm, double *bglob, spm_int_t ldbg, double *bloc, spm_int_t ldbl)
 Reduce all the global coefficients of a rhs and store the local ones.
 
void d_spmExtractLocalRHS (int nrhs, const spmatrix_t *spm, const double *bglob, spm_int_t ldbg, double *bloc, spm_int_t ldbl)
 Stores the local values of a global RHS in the local one.
 
void d_spmPrint (FILE *f, const spmatrix_t *spm)
 Write a spm matrix in a file.
 
void d_spmPrintRHS (FILE *f, const spmatrix_t *spm, int nrhs, const void *x, spm_int_t ldx)
 Write into a file the vectors associated to a spm.
 
void d_spmDensePrint (FILE *f, spm_int_t m, spm_int_t n, const double *A, spm_int_t lda)
 Print a dense matrix to the given file.
 
void d_spmExpand (const spmatrix_t *spm_in, spmatrix_t *spm_out)
 Expand a single dof sparse matrix to a multi-dofs sparse matrix.
 
void d_spmDofExtend (spmatrix_t *spm)
 Extend a single dof sparse matrix to a multi-dof sparse matrix.
 
void d_spmScal (const double alpha, spmatrix_t *spm)
 Scal the spm: A = alpha * A.
 
int d_spmRhsGenRndShm (const spmatrix_t *spm, double scale, spm_int_t n, double *A, spm_int_t lda, int shift, unsigned long long int seed)
 Generate a set of vectors of random values in shared memory.
 
int d_spmRhsGenRndDist (const spmatrix_t *spm, double alpha, spm_int_t n, double *A, spm_int_t lda, int shift, unsigned long long int seed)
 Generate a set of vectors of random values in distributed memory.
 

Detailed Description

SParse Matrix package precision dependent header.

Version
1.2.4
Author
Pierre Ramet
Mathieu Faverge
Alban Bellot
Tony Delarue
Alycia Lisito
Date
2024-05-29
Generated arithmetic file from /builds/2mk6rsew/0/fpruvost/spm/include/spm/z_spm.h, normal z -> d, Fri Nov 29 11:34:27 2024

Definition in file d_spm.h.