134 void *, int,
void *, int ) =
141 if ( (x != NULL) && (ldx <
spm_imax( 1, spm->
nexp )) ) {
142 fprintf( stderr,
"spmGenRHS: ldx must be >= max( 1, spm->nexp )\n" );
146 fprintf( stderr,
"spmGenRHS: ldb must be >= max( 1, spm->nexp )\n" );
150 if ( (
id < 0) || (
id > 3) ) {
154 return ptrfunc[id]( type, nrhs, spm, x, ldx, b, ldb );
200 if ( (spm == NULL) || (spm->
values == NULL) ) {
204 if ( bglob == NULL ) {
208 if ( bloc == NULL ) {
213 fprintf( stderr,
"spmExtractLocalRHS: ldbg must be >= max( 1, spm->gNexp )\n" );
280 if ( (spm == NULL) || (spm->
values == NULL) ) {
284 if ( bglob == NULL ) {
288 if ( bloc == NULL ) {
293 fprintf( stderr,
"spmReduceRHS: ldbg must be >= max( 1, spm->gNexp )\n" );
364 if ( (spm == NULL) || (spm->
values == NULL) ) {
368 if ( bloc == NULL ) {
373 fprintf( stderr,
"spmGatherRHS: ldbl must be >= max( 1, spm->nexp )\n" );
377 if ( ((root == -1) || (root == spm->
clustnum)) && (bglob == NULL) ) {
382 fprintf( stderr,
"spmGatherRHS: ldbg must be >= max( 1, spm->gNexp )\n" );
static spm_int_t spm_imax(spm_int_t a, spm_int_t b)
Internal function to compute max(a,b)
enum spm_rhstype_e spm_rhstype_t
How to generate RHS.
void s_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 z_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_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 c_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.
int c_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 s_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.
void c_spmReduceRHS(int nrhs, const spmatrix_t *spm, spm_complex32_t *bglob, spm_int_t ldbg, spm_complex32_t *bloc, spm_int_t ldbl)
Reduce all the global coefficients of a rhs and store the local ones.
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 z_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.
void z_spmReduceRHS(int nrhs, const spmatrix_t *spm, spm_complex64_t *bglob, spm_int_t ldbg, spm_complex64_t *bloc, spm_int_t ldbl)
Reduce all the global coefficients of a rhs and store the local ones.
void s_spmExtractLocalRHS(int nrhs, const spmatrix_t *spm, const float *bglob, spm_int_t ldbg, float *bloc, spm_int_t ldbl)
Stores the local values of a global RHS in the local one.
void z_spmGatherRHS(int nrhs, const spmatrix_t *spm, const spm_complex64_t *x, spm_int_t ldx, int root, spm_complex64_t *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 c_spmExtractLocalRHS(int nrhs, const spmatrix_t *spm, const spm_complex32_t *bglob, spm_int_t ldbg, spm_complex32_t *bloc, spm_int_t ldbl)
Stores the local values of a global RHS in the local one.
void c_spmGatherRHS(int nrhs, const spmatrix_t *spm, const spm_complex32_t *x, spm_int_t ldx, int root, spm_complex32_t *gx, spm_int_t ldgx)
Gather all the global C coefficients and store the good ones in local.
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_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 s_spmGatherRHS(int nrhs, const spmatrix_t *spm, const float *x, spm_int_t ldx, int root, float *gx, spm_int_t ldgx)
Gather all the global C coefficients and store the good ones in local.
void s_spmReduceRHS(int nrhs, const spmatrix_t *spm, float *bglob, spm_int_t ldbg, float *bloc, spm_int_t ldbl)
Reduce all the global coefficients of a rhs and store the local ones.
void z_spmExtractLocalRHS(int nrhs, const spmatrix_t *spm, const spm_complex64_t *bglob, spm_int_t ldbg, spm_complex64_t *bloc, spm_int_t ldbl)
Stores the local values of a global RHS in the local one.
int spmReduceRHS(spm_int_t nrhs, const spmatrix_t *spm, void *Bg, spm_int_t ldbg, void *Bl, spm_int_t ldbl)
Reduce an RHS thanks to spm distribution.
int spmGenRHS(spm_rhstype_t type, spm_int_t nrhs, const spmatrix_t *spm, void *opt_X, spm_int_t opt_ldx, void *B, spm_int_t ldb)
Generate right hand side vectors associated to a given matrix.
int spm_int_t
The main integer datatype used in spm arrays.
void spmPrintRHS(const spmatrix_t *spm, int nrhs, const void *x, spm_int_t ldx, FILE *stream)
Print a set of vector associated to an spm matrix.
int spmExtractLocalRHS(spm_int_t nrhs, const spmatrix_t *spm, const void *Bg, spm_int_t ldbg, void *Bl, spm_int_t ldbl)
Stores the local values of a global RHS in the local one thanks to spm distribution.
int spmGatherRHS(spm_int_t nrhs, const spmatrix_t *spm, const void *Bl, spm_int_t ldbl, int root, void *Bg, spm_int_t ldbg)
Gather an RHS thanks to spm distribution.
The sparse matrix data structure.