Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 015d94a4 authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Fix matvec with multiple dof spms

parent 9691cf6b
No related branches found
No related tags found
No related merge requests found
...@@ -736,6 +736,7 @@ spmCopy( const pastix_spm_t *spm ) ...@@ -736,6 +736,7 @@ spmCopy( const pastix_spm_t *spm )
dofsize = spm->n + 1; dofsize = spm->n + 1;
break; break;
case PastixIJV: case PastixIJV:
default:
colsize = spm->nnz; colsize = spm->nnz;
rowsize = spm->nnz; rowsize = spm->nnz;
valsize = spm->nnzexp; valsize = spm->nnzexp;
...@@ -904,21 +905,36 @@ spmMatVec(const pastix_trans_t trans, ...@@ -904,21 +905,36 @@ spmMatVec(const pastix_trans_t trans,
const void *beta, const void *beta,
void *y ) void *y )
{ {
pastix_spm_t *espm = (pastix_spm_t*)spm;
int rc = PASTIX_SUCCESS;
if ( spm->fmttype != PastixCSC ) { if ( spm->fmttype != PastixCSC ) {
return PASTIX_ERR_BADPARAMETER; return PASTIX_ERR_BADPARAMETER;
} }
if ( spm->dof != 1 ) {
espm = spmExpand( spm );
}
switch (spm->flttype) { switch (spm->flttype) {
case PastixFloat: case PastixFloat:
return s_spmCSCMatVec( trans, alpha, spm, x, beta, y ); rc = s_spmCSCMatVec( trans, alpha, espm, x, beta, y );
break;
case PastixComplex32: case PastixComplex32:
return c_spmCSCMatVec( trans, alpha, spm, x, beta, y ); rc = c_spmCSCMatVec( trans, alpha, espm, x, beta, y );
break;
case PastixComplex64: case PastixComplex64:
return z_spmCSCMatVec( trans, alpha, spm, x, beta, y ); rc = z_spmCSCMatVec( trans, alpha, espm, x, beta, y );
break;
case PastixDouble: case PastixDouble:
default: default:
return d_spmCSCMatVec( trans, alpha, spm, x, beta, y ); rc = d_spmCSCMatVec( trans, alpha, espm, x, beta, y );
}
if ( spm != espm ) {
spmExit( espm );
free(espm);
} }
return rc;
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment