Mentions légales du service

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

Some consistency in pastix_spm parameters

parent d0aac563
No related branches found
No related tags found
No related merge requests found
...@@ -459,7 +459,7 @@ spm2Dense( const pastix_spm_t *spm ) ...@@ -459,7 +459,7 @@ spm2Dense( const pastix_spm_t *spm )
* *
*******************************************************************************/ *******************************************************************************/
double double
spmNorm( int ntype, spmNorm( pastix_normtype_t ntype,
const pastix_spm_t *spm ) const pastix_spm_t *spm )
{ {
pastix_spm_t *spmtmp = (pastix_spm_t*)spm; pastix_spm_t *spmtmp = (pastix_spm_t*)spm;
...@@ -811,15 +811,15 @@ spmCopy( const 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 * @param[in] spm
* The sparse matrix to print. * The sparse matrix to print.
* *
* @param[in] f
* File to print the spm matrix.
*
*******************************************************************************/ *******************************************************************************/
void void
spmPrint(FILE *f, const pastix_spm_t* spm) spmPrint( const pastix_spm_t* spm, FILE *f )
{ {
switch(spm->flttype) switch(spm->flttype)
{ {
...@@ -862,7 +862,7 @@ spmPrint(FILE *f, const pastix_spm_t* spm) ...@@ -862,7 +862,7 @@ spmPrint(FILE *f, const pastix_spm_t* spm)
* *
*******************************************************************************/ *******************************************************************************/
pastix_spm_t * pastix_spm_t *
spmExpand(const pastix_spm_t* spm) spmExpand( const pastix_spm_t* spm )
{ {
switch(spm->flttype) switch(spm->flttype)
{ {
......
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
#ifndef _SPM_H_ #ifndef _SPM_H_
#define _SPM_H_ #define _SPM_H_
#include "pastix/api.h"
/** /**
* @brief The list of matrix driver readers and generators * @brief The list of matrix driver readers and generators
*/ */
...@@ -51,31 +53,6 @@ typedef enum pastix_driver_e { ...@@ -51,31 +53,6 @@ typedef enum pastix_driver_e {
/* PastixDriverBRGMD, /\**< Not supported yet *\/ */ /* PastixDriverBRGMD, /\**< Not supported yet *\/ */
} pastix_driver_t; } 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 * @brief The sparse matrix data structure
...@@ -135,7 +112,7 @@ void spmUpdateComputedFields( pastix_spm_t *spm ); ...@@ -135,7 +112,7 @@ void spmUpdateComputedFields( pastix_spm_t *spm );
* @name SPM BLAS subroutines * @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 ); 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 ); 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 ...@@ -162,10 +139,10 @@ int spmCheckAxb( int nrhs, const pastix_spm_t *spm, void *x0, int ldx0
* @name SPM subroutines to manipulate integers arrays * @name SPM subroutines to manipulate integers arrays
* @{ * @{
*/ */
pastix_int_t *spmIntConvert( pastix_int_t n, int *input ); pastix_int_t *spmIntConvert( pastix_int_t n, int *input );
void spmIntSort1Asc1(void * const pbase, const pastix_int_t n); void spmIntSort1Asc1( void * const pbase, const pastix_int_t n );
void spmIntSort2Asc1(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); void spmIntSort2Asc2( void * const pbase, const pastix_int_t n );
/** /**
* @} * @}
...@@ -189,10 +166,10 @@ int spmReadDriver( pastix_driver_t driver, ...@@ -189,10 +166,10 @@ int spmReadDriver( pastix_driver_t driver,
* @name SPM debug subroutines * @name SPM debug subroutines
* @{ * @{
*/ */
void * spm2Dense( const pastix_spm_t *spm ); void * spm2Dense ( const pastix_spm_t *spm );
void spmPrint( FILE *f, 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 *spmExpand ( const pastix_spm_t* spm );
pastix_spm_t *spmDofExtend( const int type, const int dof, const pastix_spm_t *spm ); pastix_spm_t *spmDofExtend( const pastix_spm_t *spm, const int type, const int dof );
/** /**
* @} * @}
......
...@@ -32,6 +32,9 @@ ...@@ -32,6 +32,9 @@
* *
******************************************************************************* *******************************************************************************
* *
* @param[in] spm
* The sparse matrix used to generate the new multidof spm.
*
* @param[in] type * @param[in] type
* Defines how to generate dofs. * Defines how to generate dofs.
* - 0: Generate a constant dof vector, * - 0: Generate a constant dof vector,
...@@ -40,18 +43,15 @@ ...@@ -40,18 +43,15 @@
* @param[in] dof * @param[in] dof
* The maximum value for dofs. * The maximum value for dofs.
* *
* @param[in] spm
* The sparse matrix used to generate the new multidof spm.
*
******************************************************************************** ********************************************************************************
* *
* @return the new multidof spm. * @return the new multidof spm.
* *
*******************************************************************************/ *******************************************************************************/
pastix_spm_t * pastix_spm_t *
spmDofExtend( const int type, spmDofExtend( const pastix_spm_t *spm,
const int dof, const int type,
const pastix_spm_t *spm ) const int dof )
{ {
pastix_spm_t *newspm; pastix_spm_t *newspm;
......
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