diff --git a/spm.c b/spm.c index df75223cff6ecda66df9159350c350efd8511ebc..8b4ced8de12e53ee5129fbed43d1047e6c66b3a2 100644 --- a/spm.c +++ b/spm.c @@ -459,7 +459,7 @@ spm2Dense( const pastix_spm_t *spm ) * *******************************************************************************/ double -spmNorm( int ntype, +spmNorm( pastix_normtype_t ntype, const pastix_spm_t *spm ) { pastix_spm_t *spmtmp = (pastix_spm_t*)spm; @@ -811,15 +811,15 @@ spmCopy( const pastix_spm_t *spm ) * ******************************************************************************* * - * @param[in] f - * File to print the spm matrix. - * * @param[in] spm * The sparse matrix to print. * + * @param[in] f + * File to print the spm matrix. + * *******************************************************************************/ void -spmPrint(FILE *f, const pastix_spm_t* spm) +spmPrint( const pastix_spm_t* spm, FILE *f ) { switch(spm->flttype) { @@ -862,7 +862,7 @@ spmPrint(FILE *f, const pastix_spm_t* spm) * *******************************************************************************/ pastix_spm_t * -spmExpand(const pastix_spm_t* spm) +spmExpand( const pastix_spm_t* spm ) { switch(spm->flttype) { diff --git a/spm.h b/spm.h index 4ce46baf3ab01e06db9ed963b1a3d6bf0f3035d3..6860d6c799eacf272501bd455db9c4487d56b777 100644 --- a/spm.h +++ b/spm.h @@ -27,6 +27,8 @@ #ifndef _SPM_H_ #define _SPM_H_ +#include "pastix/api.h" + /** * @brief The list of matrix driver readers and generators */ @@ -51,31 +53,6 @@ typedef enum pastix_driver_e { /* PastixDriverBRGMD, /\**< Not supported yet *\/ */ } pastix_driver_t; -/** - * @brief Arithmetic types. - * - * This describes the different arithmetics that can be stored in a sparse matrix. - * @remark The values start at 2 for compatibility purpose with PLASMA and - * DPLASMA libraries. - */ -typedef enum pastix_coeftype_e { - PastixPattern = 0, /**< Pattern only, no values are stored */ - PastixFloat = 2, /**< Single precision real */ - PastixDouble = 3, /**< Double precision real */ - PastixComplex32 = 4, /**< Single precision complex */ - PastixComplex64 = 5 /**< Double precision complex */ -} pastix_coeftype_t; - -/** - * @brief Sparse matrix format - */ -typedef enum pastix_fmttype_e { - PastixCSC = 0, /**< Compressed sparse column */ - PastixCSR = 1, /**< Compressed sparse row */ - PastixIJV = 2 /**< Coordinates */ -} pastix_fmttype_t; - - /** * * @brief The sparse matrix data structure @@ -135,7 +112,7 @@ void spmUpdateComputedFields( pastix_spm_t *spm ); * @name SPM BLAS subroutines * @{ */ -double spmNorm( int ntype, const pastix_spm_t *spm ); +double spmNorm( pastix_normtype_t 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 ); void spmScal( const pastix_complex64_t alpha, pastix_spm_t* spm ); @@ -162,10 +139,10 @@ int spmCheckAxb( int nrhs, const pastix_spm_t *spm, void *x0, int ldx0 * @name SPM subroutines to manipulate integers arrays * @{ */ -pastix_int_t *spmIntConvert( pastix_int_t n, int *input ); -void spmIntSort1Asc1(void * const pbase, const pastix_int_t n); -void spmIntSort2Asc1(void * const pbase, const pastix_int_t n); -void spmIntSort2Asc2(void * const pbase, const pastix_int_t n); +pastix_int_t *spmIntConvert( pastix_int_t n, int *input ); +void spmIntSort1Asc1( void * const pbase, const pastix_int_t n ); +void spmIntSort2Asc1( void * const pbase, const pastix_int_t n ); +void spmIntSort2Asc2( void * const pbase, const pastix_int_t n ); /** * @} @@ -189,10 +166,10 @@ int spmReadDriver( pastix_driver_t driver, * @name SPM debug subroutines * @{ */ -void * spm2Dense( const pastix_spm_t *spm ); -void spmPrint( FILE *f, const pastix_spm_t *spm ); -pastix_spm_t *spmExpand(const pastix_spm_t* spm); -pastix_spm_t *spmDofExtend( const int type, const int dof, const pastix_spm_t *spm ); +void * spm2Dense ( const pastix_spm_t *spm ); +void spmPrint ( const pastix_spm_t *spm, FILE *f ); +pastix_spm_t *spmExpand ( const pastix_spm_t* spm ); +pastix_spm_t *spmDofExtend( const pastix_spm_t *spm, const int type, const int dof ); /** * @} diff --git a/spm_dof_extend.c b/spm_dof_extend.c index f0f5756c56da37a3d069041b695b6751e4b62f4e..15362c4f4b90d2e7a1cb15e3fa522bc9a8a203fe 100644 --- a/spm_dof_extend.c +++ b/spm_dof_extend.c @@ -32,6 +32,9 @@ * ******************************************************************************* * + * @param[in] spm + * The sparse matrix used to generate the new multidof spm. + * * @param[in] type * Defines how to generate dofs. * - 0: Generate a constant dof vector, @@ -40,18 +43,15 @@ * @param[in] dof * The maximum value for dofs. * - * @param[in] spm - * The sparse matrix used to generate the new multidof spm. - * ******************************************************************************** * * @return the new multidof spm. * *******************************************************************************/ pastix_spm_t * -spmDofExtend( const int type, - const int dof, - const pastix_spm_t *spm ) +spmDofExtend( const pastix_spm_t *spm, + const int type, + const int dof ) { pastix_spm_t *newspm;