Mentions légales du service

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

Add comme spm2dense function

parent cbe40777
No related branches found
No related tags found
No related merge requests found
......@@ -305,6 +305,43 @@ spmConvert( int ofmttype, pastix_spm_t *spm )
}
}
/**
*******************************************************************************
*
* @ingroup pastix_spm
*
* @brief Convert the spm matrix into a dense matrix for test purpose. DO NOT
* USE with large matrices.
*
*******************************************************************************
*
* @param[in,out] spm
* The sparse matrix structure to convert.
*
********************************************************************************
*
* @return
* The pointer to the allocated array storing the dense version of the
* matrix.
*
*******************************************************************************/
void *
spm2Dense( const pastix_spm_t *spm )
{
switch (spm->flttype) {
case PastixFloat:
return s_spm2dense( spm );
case PastixComplex32:
return c_spm2dense( spm );
case PastixComplex64:
return z_spm2dense( spm );
case PastixDouble:
return d_spm2dense( spm );
default:
return NULL;
}
}
/**
*******************************************************************************
*
......
......@@ -126,6 +126,7 @@ void spmExit( pastix_spm_t *spm );
pastix_spm_t *spmCopy( const pastix_spm_t *spm );
void spmBase( pastix_spm_t *spm, int baseval );
int spmConvert( int ofmttype, pastix_spm_t *ospm );
void * spm2Dense( const pastix_spm_t *spm );
pastix_int_t spmFindBase( const pastix_spm_t *spm );
double spmNorm( int ntype, const pastix_spm_t *spm );
int spmMatVec(const pastix_trans_t trans, const void *alpha, const pastix_spm_t *spm, const void *x, const void *beta, void *y );
......
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