From 23e7b1e80e3b83f68b5a575ea967add83d87929b Mon Sep 17 00:00:00 2001 From: Mathieu Faverge <mathieu.faverge@inria.fr> Date: Mon, 13 Mar 2017 20:20:17 +0100 Subject: [PATCH] A second pass on spm --- CMakeLists.txt | 4 +- drivers/laplacian.c | 6 +- drivers/readmm.c | 6 +- spm.c | 72 +++------- spm.h | 8 +- spm_dofs.c => spm_dof_extend.c | 13 +- spm_drivers.h | 5 +- spm_integers.c | 9 +- spm_io.c | 9 +- spm_read_driver.c | 7 +- z_spm.c | 19 ++- z_spm.h | 24 ++-- z_spm_2dense.c | 55 +++++--- z_spm_convert_to_csc.c | 16 +-- z_spm_convert_to_csr.c | 15 +-- z_spm_convert_to_ijv.c | 15 +-- z_spm_dof_extend.c | 19 +-- z_spm_dofs2flat.c | 237 --------------------------------- z_spm_expand.c | 55 +++++--- z_spm_genrhs.c | 39 +++--- z_spm_integer.c | 7 +- z_spm_laplacian.c | 5 +- z_spm_matrixvector.c | 29 ++-- z_spm_norm.c | 35 ++--- z_spm_print.c | 7 +- z_spm_scal.c | 8 +- 26 files changed, 240 insertions(+), 484 deletions(-) rename spm_dofs.c => spm_dof_extend.c (90%) delete mode 100644 z_spm_dofs2flat.c diff --git a/CMakeLists.txt b/CMakeLists.txt index 26f1d70c..32ea88cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,7 +54,7 @@ set(spm_sources spm.c spm_io.c spm_integers.c - spm_dofs.c + spm_dof_extend.c spm_read_driver.c drivers/skitf.f drivers/iohb.c @@ -93,7 +93,7 @@ add_documented_files( add_documented_files( # Headers spm.h - spm_drivers.h + #spm_drivers.h # Source files spm.c spm_io.c diff --git a/drivers/laplacian.c b/drivers/laplacian.c index 4ad213ae..74c8e0c7 100644 --- a/drivers/laplacian.c +++ b/drivers/laplacian.c @@ -61,7 +61,7 @@ laplacian_usage(void) * Configuration string of the Laplacian. See laplacian_usage() for * more information. * - * @param[in,out] csc + * @param[inout] csc * At start, an allocated csc structure that will store the Lapalcian * matrix. * At exit, the fields of the csc are initialized and especially the @@ -253,7 +253,7 @@ static void (*extended_laplacian_table3D[6])(pastix_csc_t*, pastix_int_t, pastix * <dim2> size of the second dimension of the 2D|3D laplacian\n" * <dim3> size of the third dimension of the 3D laplacian\n" * - * @param[in,out] csc + * @param[inout] csc * At start, an allocated csc structure. * At exit, contains a laplacian matrix in the csc format. * @@ -309,7 +309,7 @@ genLaplacian( const char *filename, * <dim2> size of the second dimension of the 2D|3D laplacian * <dim3> size of the third dimension of the 3D laplacian * - * @param[in,out] csc + * @param[inout] csc * At start, an allocated csc structure. * At exit, contains a laplacian matrix in the csc format. * diff --git a/drivers/readmm.c b/drivers/readmm.c index e6904e9b..681fb878 100644 --- a/drivers/readmm.c +++ b/drivers/readmm.c @@ -29,7 +29,7 @@ * The file opened in readMM which contains the matrix stored in Matrix * Market format. * - * @param[in,out] csc + * @param[inout] csc * At exit, the data of the matrix are stored in the csc structure. * ******************************************************************************* @@ -86,7 +86,7 @@ z_readMM( FILE *file, * The file opened in readMM which contains the matrix stored in Matrix * Market format. * - * @param[in,out] csc + * @param[inout] csc * At exit, the data of the matrix are stored in the csc structure. * ******************************************************************************* @@ -143,7 +143,7 @@ d_readMM( FILE *file, * The file opened in readMM which contains the matrix stored in Matrix * Market format. * - * @param[in,out] csc + * @param[inout] csc * At exit, the data of the matrix are stored in the csc structure. * ******************************************************************************* diff --git a/spm.c b/spm.c index d4a066f4..b8e030a7 100644 --- a/spm.c +++ b/spm.c @@ -2,16 +2,19 @@ * * @file spm.c * - * PaStiX spm routines - * PaStiX is a software package provided by Inria Bordeaux - Sud-Ouest, - * LaBRI, University of Bordeaux 1 and IPB. + * SParse Matrix package main routines. * - * @version 6.0.0 + * @copyright 2016-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, + * Univ. Bordeaux. All rights reserved. + * + * @version 1.0.0 * @author Xavier Lacoste * @author Pierre Ramet * @author Mathieu Faverge * @date 2013-06-24 * + * @addtogroup pastix_spm + * @{ **/ #include "common.h" #include "spm.h" @@ -22,7 +25,7 @@ #include "s_spm.h" #include "p_spm.h" -#ifndef DOXYGEN_SHOULD_SKIP_THIS +#if !defined(DOXYGEN_SHOULD_SKIP_THIS) static int (*conversionTable[3][3][6])(pastix_spm_t*) = { /* From CSC */ @@ -69,13 +72,11 @@ static int (*conversionTable[3][3][6])(pastix_spm_t*) = { { NULL, NULL, NULL, NULL, NULL, NULL }} }; -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ +#endif /* !defined(DOXYGEN_SHOULD_SKIP_THIS) */ /** ******************************************************************************* * - * @ingroup pastix_spm - * * @brief Init the spm structure. * ******************************************************************************* @@ -114,8 +115,6 @@ spmInit( pastix_spm_t *spm ) /** ******************************************************************************* * - * @ingroup pastix_spm - * * @brief Update all the computed fields based on the static values stored. * ******************************************************************************* @@ -190,8 +189,6 @@ spmUpdateComputedFields( pastix_spm_t *spm ) /** ******************************************************************************* * - * @ingroup pastix_spm - * * @brief Free the spm structure. * ******************************************************************************* @@ -218,8 +215,6 @@ spmExit( pastix_spm_t *spm ) /** ******************************************************************************* * - * @ingroup pastix_spm - * * @brief Rebase the arrays of the spm to the given value. * * If the value is equal to the original base, then nothing is performed. @@ -310,8 +305,6 @@ spmBase( pastix_spm_t *spm, /** ******************************************************************************* * - * @ingroup pastix_spm - * * @brief Search the base used in the spm structure. * ******************************************************************************* @@ -353,8 +346,6 @@ spmFindBase( const pastix_spm_t *spm ) /** ******************************************************************************* * - * @ingroup pastix_spm - * * @brief Convert the storage format of the spm. * ******************************************************************************* @@ -370,9 +361,9 @@ spmFindBase( const pastix_spm_t *spm ) * ******************************************************************************** * - * @return - * \retval PASTIX_SUCCESS if the conversion happened successfully. - * \retval PASTIX_ERR_BADPARAMETER if one the parameter is incorrect. + * @retval PASTIX_SUCCESS if the conversion happened successfully. + * @retval PASTIX_ERR_BADPARAMETER if one the parameter is incorrect. + * @retval PASTIX_ERR_NOTIMPLEMENTED if the case is not yet implemented. * *******************************************************************************/ int @@ -393,11 +384,9 @@ 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. + * @remark DO NOT USE with large matrices. * ******************************************************************************* * @@ -431,8 +420,6 @@ spm2Dense( const pastix_spm_t *spm ) /** ******************************************************************************* * - * @ingroup pastix_spm - * * @brief Compute the norm of the spm. * * Return the ntype norm of the sparse matrix spm. @@ -464,9 +451,10 @@ spm2Dense( const pastix_spm_t *spm ) * ******************************************************************************** * - * @retval norm The norm described above. Note that for simplicity, even if - * the norm of single real or single complex matrix is computed with - * single precision, the returned norm is stored in double precision. + * @retval norm The norm described above. Note that for simplicity, even if the + * norm of single real or single complex matrix is computed with + * single precision, the returned norm is stored in double + * precision. * @retval -1 If the floating point of the sparse matrix is undefined. * *******************************************************************************/ @@ -513,8 +501,6 @@ spmNorm( int ntype, /** ******************************************************************************* * - * @ingroup pastix_spm - * * @brief Sort the subarray of edges of each vertex in a CSC or CSR format. * * Nothing is performed if IJV format is used. @@ -566,8 +552,6 @@ spmSort( pastix_spm_t *spm ) /** ******************************************************************************* * - * @ingroup pastix_spm - * * @brief Merge multiple entries in a spm by summing their values together. * * The sparse matrix needs to be sorted first (see spmSort()). @@ -618,8 +602,6 @@ spmMergeDuplicate( pastix_spm_t *spm ) /** ******************************************************************************* * - * @ingroup pastix_spm - * * @brief Symmetrize the pattern of the spm. * * This routine corrects the sparse matrix structure if it's pattern is not @@ -670,8 +652,6 @@ spmSymmetrize( pastix_spm_t *spm ) /** ******************************************************************************* * - * @ingroup pastix_spm - * * @brief Check the correctness of a spm. * * This routine initializes the sparse matrix to fit the PaStiX requirements. If @@ -754,8 +734,6 @@ spmCheckAndCorrect( pastix_spm_t *spm ) /** ******************************************************************************* * - * @ingroup pastix_spm - * * @brief Create a copy of the spm. * * Duplicate the spm data structure given as parameter. All new arrays are @@ -829,8 +807,6 @@ spmCopy( const pastix_spm_t *spm ) /** ******************************************************************************* * - * @ingroup pastix_spm - * * @brief Print an spm matrix into into a given file. * ******************************************************************************* @@ -868,8 +844,6 @@ spmPrint(FILE *f, const pastix_spm_t* spm) /** ******************************************************************************* * - * @ingroup pastix_spm - * * @brief Expand a multi-dof spm matrix into an spm with constant dof set to 1. * * Duplicate the spm data structure given as parameter. All new arrays are @@ -913,8 +887,6 @@ spmExpand(const pastix_spm_t* spm) /** ******************************************************************************* * - * @ingroup pastix_spm - * * @brief Compute a matrix-vector product. * * y = alpha * op(A) * x + beta * y, where op(A) is one of @@ -995,8 +967,6 @@ spmMatVec(const pastix_trans_t trans, /** ******************************************************************************* * - * @ingroup pastix_spm - * * @brief Generate right hand side vectors associated to a given matrix. * * The vectors can be initialized randomly or to get a specific solution. @@ -1065,8 +1035,6 @@ spmGenRHS( int type, int nrhs, /** ******************************************************************************* * - * @ingroup pastix_spm - * * @brief Check the backward error, and the forward error if x0 is provided. * ******************************************************************************* @@ -1132,8 +1100,6 @@ spmCheckAxb( int nrhs, /** ******************************************************************************* * - * @ingroup pastix_spm - * * @brief Scale the spm. * * A = alpha * A @@ -1168,3 +1134,7 @@ spmScal(const pastix_complex64_t alpha, pastix_spm_t* spm) d_spmScal(alpha, spm); } } + +/** + * @} + */ diff --git a/spm.h b/spm.h index 5114aa53..f79b9a69 100644 --- a/spm.h +++ b/spm.h @@ -2,10 +2,12 @@ * * @file spm.h * - * PaStiX sparse matrix routines to handle different format of sparse matrices. - * $COPYRIGHTS$ + * SParse Matrix package header. * - * @version 6.0.0 + * @copyright 2016-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, + * Univ. Bordeaux. All rights reserved. + * + * @version 1.0.0 * @author Xavier Lacoste * @author Pierre Ramet * @author Mathieu Faverge diff --git a/spm_dofs.c b/spm_dof_extend.c similarity index 90% rename from spm_dofs.c rename to spm_dof_extend.c index facbe5fc..f0f5756c 100644 --- a/spm_dofs.c +++ b/spm_dof_extend.c @@ -1,12 +1,13 @@ /** * - * @file spm_dofs.c + * @file spm_dof_extend.c * - * PaStiX spm routines - * PaStiX is a software package provided by Inria Bordeaux - Sud-Ouest, - * LaBRI, University of Bordeaux 1 and IPB. + * SParse Matrix package random multi-dofs generator. * - * @version 6.0.0 + * @copyright 2016-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, + * Univ. Bordeaux. All rights reserved. + * + * @version 1.0.0 * @author Mathieu Faverge * @author Theophile Terraz * @author Alban Bellot @@ -36,7 +37,7 @@ * - 0: Generate a constant dof vector, * - else: Generate a variable dof vector. * - * @param[in] dof + * @param[in] dof * The maximum value for dofs. * * @param[in] spm diff --git a/spm_drivers.h b/spm_drivers.h index 4a48bf02..c99509e4 100644 --- a/spm_drivers.h +++ b/spm_drivers.h @@ -1,7 +1,10 @@ /** * @file spm_drivers.h * - * $COPYRIGHTS$ + * SParse Matrix package driver header. + * + * @copyright 2016-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, + * Univ. Bordeaux. All rights reserved. * * @version 1.0.0 * @author Mathieu Faverge diff --git a/spm_integers.c b/spm_integers.c index 2029da67..18deca7d 100644 --- a/spm_integers.c +++ b/spm_integers.c @@ -2,11 +2,12 @@ * * @file spm_integers.c * - * PaStiX spm routines - * PaStiX is a software package provided by Inria Bordeaux - Sud-Ouest, - * LaBRI, University of Bordeaux 1 and IPB. + * SParse Matrix package integers array management routines. * - * @version 6.0.0 + * @copyright 2016-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, + * Univ. Bordeaux. All rights reserved. + * + * @version 1.0.0 * @author Francois Pellegrini * @author Xavier Lacoste * @author Pierre Ramet diff --git a/spm_io.c b/spm_io.c index 76678ba0..e4bf21fc 100644 --- a/spm_io.c +++ b/spm_io.c @@ -2,11 +2,12 @@ * * @file spm_io.c * - * PaStiX spm routines - * PaStiX is a software package provided by Inria Bordeaux - Sud-Ouest, - * LaBRI, University of Bordeaux 1 and IPB. + * SParse Matrix package I/O routines. * - * @version 6.0.0 + * @copyright 2016-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, + * Univ. Bordeaux. All rights reserved. + * + * @version 1.0.0 * @author Xavier Lacoste * @author Pierre Ramet * @author Mathieu Faverge diff --git a/spm_read_driver.c b/spm_read_driver.c index 8fb6382b..4309f8c3 100644 --- a/spm_read_driver.c +++ b/spm_read_driver.c @@ -1,9 +1,10 @@ /** * @file spm_read_driver.c * - * PaStiX spm routines - * PaStiX is a software package provided by Inria Bordeaux - Sud-Ouest, - * LaBRI, University of Bordeaux 1 and IPB. + * SParse Matrix package file driver. + * + * @copyright 2016-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, + * Univ. Bordeaux. All rights reserved. * * @version 1.0.0 * @author Mathieu Faverge diff --git a/z_spm.c b/z_spm.c index a7cb855a..a9923f3c 100644 --- a/z_spm.c +++ b/z_spm.c @@ -2,11 +2,12 @@ * * @file z_spm.c * - * PaStiX spm routines - * PaStiX is a software package provided by Inria Bordeaux - Sud-Ouest, - * LaBRI, University of Bordeaux 1 and IPB. + * SParse Matrix package precision dependent routines. * - * @version 5.1.0 + * @copyright 2016-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, + * Univ. Bordeaux. All rights reserved. + * + * @version 1.0.0 * @author Mathieu Faverge * @date 2013-06-24 * @@ -27,7 +28,7 @@ * * Nothing is performed if IJV format is used. * - * WARNING: This function should NOT be called if dof is greater than 1. + * @WARNING This function should NOT be called if dof is greater than 1. * ******************************************************************************* * @@ -98,7 +99,7 @@ z_spmSort( pastix_spm_t *spm ) * * The sparse matrix needs to be sorted first (see z_spmSort()). * - * WARNING: This function should NOT be called if dof is greater than 1. + * @WARNING This function should NOT be called if dof is greater than 1. * ******************************************************************************* * @@ -109,8 +110,7 @@ z_spmSort( pastix_spm_t *spm ) * ******************************************************************************** * - * @return - * \retval The number of vertices that were merged + * @return The number of vertices that were merged * *******************************************************************************/ pastix_int_t @@ -203,8 +203,7 @@ z_spmMergeDuplicate( pastix_spm_t *spm ) * ******************************************************************************* * - * @return - * \retval Returns the number of entries added to the matrix. + * @retval Return the number of entries added to the matrix. * *******************************************************************************/ pastix_int_t diff --git a/z_spm.h b/z_spm.h index 163325e4..5a86b778 100644 --- a/z_spm.h +++ b/z_spm.h @@ -2,10 +2,12 @@ * * @file z_spm.h * - * PaStiX sparse matrix routines to handle different format of sparse matrices. - * $COPYRIGHTS$ + * SParse Matrix package precision dependent header. * - * @version 5.1.0 + * @copyright 2016-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, + * Univ. Bordeaux. All rights reserved. + * + * @version 1.0.0 * @author Xavier Lacoste * @author Theophile Terraz * @author Pierre Ramet @@ -41,19 +43,19 @@ pastix_complex64_t *z_spm2dense( const pastix_spm_t *spm ); /** * Matrix-Vector product routines */ -int z_spmGeCSCv(const pastix_trans_t trans, pastix_complex64_t alpha, const pastix_spm_t *csc, const pastix_complex64_t *x, pastix_complex64_t beta, pastix_complex64_t *y); -int z_spmSyCSCv( pastix_complex64_t alpha, const pastix_spm_t *csc, const pastix_complex64_t *x, pastix_complex64_t beta, pastix_complex64_t *y); -int z_spmHeCSCv( pastix_complex64_t alpha, const pastix_spm_t *csc, const pastix_complex64_t *x, pastix_complex64_t beta, pastix_complex64_t *y); +int z_spmCSCMatVec(const pastix_trans_t trans, const void *alpha, const pastix_spm_t *spm, const void *x, const void *beta, void *y); -int z_spmCSCMatVec(const pastix_trans_t trans, const void *alpha, const pastix_spm_t *csc, const void *x, const void *beta, void *y); +/** + * Norm computation routines + */ +double z_spmNorm( int ntype, const pastix_spm_t *spm ); /** * Extra routines */ -double z_spmNorm( int ntype, const pastix_spm_t *csc ); -void z_spmSort( pastix_spm_t *csc ); -pastix_int_t z_spmMergeDuplicate( pastix_spm_t *csc ); -pastix_int_t z_spmSymmetrize( pastix_spm_t *csc ); +void z_spmSort( pastix_spm_t *spm ); +pastix_int_t z_spmMergeDuplicate( pastix_spm_t *spm ); +pastix_int_t z_spmSymmetrize( pastix_spm_t *spm ); int z_spmGenRHS(int type, int nrhs, const pastix_spm_t *spm, void *x, int ldx, void *b, int ldb ); int z_spmCheckAxb( int nrhs, const pastix_spm_t *spm, void *x0, int ldx0, void *b, int ldb, const void *x, int ldx ); diff --git a/z_spm_2dense.c b/z_spm_2dense.c index da31bf3a..ed2b4044 100644 --- a/z_spm_2dense.c +++ b/z_spm_2dense.c @@ -2,9 +2,12 @@ * * @file z_spm_2dense.c * - * Convert a sparse matrix into a dense matrix. + * SParse Matrix package conversion to dense routine. * - * @version 5.1.0 + * @copyright 2016-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, + * Univ. Bordeaux. All rights reserved. + * + * @version 1.0.0 * @author Mathieu Faverge * @author Theophile Terraz * @author Alban Bellot @@ -31,16 +34,18 @@ * * @brief Convert a CSC matrix into a dense matrix. * + * The denses matrix is initialized with zeroes and filled with the spm matrix + * values. When the matrix is hermitian or symmetric, both sides (upper and + * lower) of the dense matrix are initialized. + * ******************************************************************************* * * @param[in] spm - * The sparse matrix uses to generate the right hand side, and the - * solution of the full problem. + * The sparse matrix in the CSC format. * ******************************************************************************* * - * @return - * \retval A TODO + * @return A dense matrix in Lapack layout format * *******************************************************************************/ pastix_complex64_t * @@ -207,16 +212,18 @@ z_spmCSC2dense( const pastix_spm_t *spm ) * * @brief Convert a CSR matrix into a dense matrix. * + * The denses matrix is initialized with zeroes and filled with the spm matrix + * values. When the matrix is hermitian or symmetric, both sides (upper and + * lower) of the dense matrix are initialized. + * ******************************************************************************* * * @param[in] spm - * The sparse matrix uses to generate the right hand side, and the - * solution of the full problem. + * The sparse matrix in the CSR format. * ******************************************************************************* * - * @return - * \retval A TODO + * @return A dense matrix in Lapack layout format * *******************************************************************************/ pastix_complex64_t * @@ -383,16 +390,18 @@ z_spmCSR2dense( const pastix_spm_t *spm ) * * @brief Convert a IJV matrix into a dense matrix. * + * The denses matrix is initialized with zeroes and filled with the spm matrix + * values. When the matrix is hermitian or symmetric, both sides (upper and + * lower) of the dense matrix are initialized. + * ******************************************************************************* * * @param[in] spm - * The sparse matrix uses to generate the right hand side, and the - * solution of the full problem. + * The sparse matrix in the IJV format. * ******************************************************************************* * - * @return - * \retval A TODO + * @return A dense matrix in Lapack layout format * *******************************************************************************/ pastix_complex64_t * @@ -575,16 +584,18 @@ z_spmIJV2dense( const pastix_spm_t *spm ) * * @brief Convert a sparse matrix into a dense matrix. * + * The denses matrix is initialized with zeroes and filled with the spm matrix + * values. When the matrix is hermitian or symmetric, both sides (upper and + * lower) of the dense matrix are initialized. + * ******************************************************************************* * * @param[in] spm - * The sparse matrix uses to generate the right hand side, and the - * solution of the full problem. + * The sparse matrix to convert in any format. * ******************************************************************************* * - * @return - * \retval A TODO + * @return A dense matrix in Lapack layout format * *******************************************************************************/ pastix_complex64_t * @@ -606,19 +617,25 @@ z_spm2dense( const pastix_spm_t *spm ) * * @ingroup pastix_spm_dev * - * @brief TODO + * @brief Print a dense matrix to the given file * ******************************************************************************* * * @param[in] f + * Open file descriptor on which to write the matrix. * * @param[in] m + * Number of rows of the matrix A. * * @param[in] n + * Number of columns of the matrix A. + * * * @param[in] A + * The matrix to print of size lda -by- n * * @param[in] lda + * the leading dimension of the matrix A. lda >= m * *******************************************************************************/ void diff --git a/z_spm_convert_to_csc.c b/z_spm_convert_to_csc.c index 4b0a2c83..378fde18 100644 --- a/z_spm_convert_to_csc.c +++ b/z_spm_convert_to_csc.c @@ -2,16 +2,18 @@ * * @file z_spm_convert_to_csc.c * - * PaStiX spm routines - * PaStiX is a software package provided by Inria Bordeaux - Sud-Ouest, - * LaBRI, University of Bordeaux 1 and IPB. + * SParse Matrix package conversion routines. * - * @version 5.1.0 + * @copyright 2016-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, + * Univ. Bordeaux. All rights reserved. + * + * @version 1.0.0 * @author Mathieu Faverge * @author Theophile Terraz * @date 2015-01-01 * * @precisions normal z -> c d s p + * **/ #include "common.h" #include "spm.h" @@ -33,8 +35,7 @@ * ******************************************************************************* * - * @return - * \retval PASTIX_SUCCESS + * @retval PASTIX_SUCCESS * *******************************************************************************/ int @@ -142,8 +143,7 @@ z_spmConvertIJV2CSC( pastix_spm_t *spm ) * ******************************************************************************* * - * @return - * \retval PASTIX_SUCCESS + * @retval PASTIX_SUCCESS * *******************************************************************************/ int diff --git a/z_spm_convert_to_csr.c b/z_spm_convert_to_csr.c index 363654c9..58631f87 100644 --- a/z_spm_convert_to_csr.c +++ b/z_spm_convert_to_csr.c @@ -2,11 +2,12 @@ * * @file z_spm_convert_to_csr.c * - * PaStiX spm routines - * PaStiX is a software package provided by Inria Bordeaux - Sud-Ouest, - * LaBRI, University of Bordeaux 1 and IPB. + * SParse Matrix package conversion routines. * - * @version 5.1.0 + * @copyright 2016-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, + * Univ. Bordeaux. All rights reserved. + * + * @version 1.0.0 * @author Mathieu Faverge * @author Theophile Terraz * @date 2015-01-01 @@ -35,8 +36,7 @@ * ******************************************************************************* * - * @return - * \retval PASTIX_SUCCESS + * @retval PASTIX_SUCCESS * *******************************************************************************/ int @@ -113,8 +113,7 @@ z_spmConvertCSC2CSR( pastix_spm_t *spm ) * ******************************************************************************* * - * @return - * \retval PASTIX_SUCCESS + * @retval PASTIX_SUCCESS * *******************************************************************************/ int diff --git a/z_spm_convert_to_ijv.c b/z_spm_convert_to_ijv.c index 6cb9afe8..5f4e4dc4 100644 --- a/z_spm_convert_to_ijv.c +++ b/z_spm_convert_to_ijv.c @@ -2,11 +2,12 @@ * * @file z_spm_convert_to_ijv.c * - * PaStiX spm routines - * PaStiX is a software package provided by Inria Bordeaux - Sud-Ouest, - * LaBRI, University of Bordeaux 1 and IPB. + * SParse Matrix package conversion routines. * - * @version 5.1.0 + * @copyright 2016-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, + * Univ. Bordeaux. All rights reserved. + * + * @version 1.0.0 * @author Mathieu Faverge * @author Theophile Terraz * @date 2015-01-01 @@ -32,8 +33,7 @@ * ******************************************************************************* * - * @return - * \retval PASTIX_SUCCESS + * @retval PASTIX_SUCCESS * *******************************************************************************/ int @@ -82,8 +82,7 @@ z_spmConvertCSC2IJV( pastix_spm_t *spm ) * ******************************************************************************* * - * @return - * \retval PASTIX_SUCCESS + * @retval PASTIX_SUCCESS * *******************************************************************************/ int diff --git a/z_spm_dof_extend.c b/z_spm_dof_extend.c index 0db18910..df45dc39 100644 --- a/z_spm_dof_extend.c +++ b/z_spm_dof_extend.c @@ -2,11 +2,12 @@ * * @file z_spm_dof_extend.c * - * PaStiX spm routines - * PaStiX is a software package provided by Inria Bordeaux - Sud-Ouest, - * LaBRI, University of Bordeaux 1 and IPB. + * SParse Matrix package multi-dof matrix expanser. * - * @version 5.1.0 + * @copyright 2016-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, + * Univ. Bordeaux. All rights reserved. + * + * @version 1.0.0 * @author Mathieu Faverge * @author Alban Bellot * @date 2015-01-01 @@ -22,18 +23,12 @@ * * @ingroup pastix_spm_dev * - * @brief convert a matrix in CSR format to a matrix in IJV format. + * @brief Extend a multi-dof sparse matrix to a single dof sparse matrix. * ******************************************************************************* * * @param[in,out] spm - * The sparse matrix uses to generate the right hand side, and the - * solution of the full problem. - * - ******************************************************************************* - * - * @return - * \retval PASTIX_SUCCESS + * The sparse matrix to extend. * *******************************************************************************/ void diff --git a/z_spm_dofs2flat.c b/z_spm_dofs2flat.c deleted file mode 100644 index 16a466ec..00000000 --- a/z_spm_dofs2flat.c +++ /dev/null @@ -1,237 +0,0 @@ -/** - * - * @file z_spm_dofs2flat.c - * - * PaStiX spm routines - * PaStiX is a software package provided by Inria Bordeaux - Sud-Ouest, - * LaBRI, University of Bordeaux 1 and IPB. - * - * @version 5.1.0 - * @author Mathieu Faverge - * @author Theophile Terraz - * @author Alban Bellot - * @date 2015-01-01 - * - * @precisions normal z -> c d s - * - **/ -#include <stdint.h> -#include <stdlib.h> -#include <stdio.h> -#include <math.h> -#include <string.h> -#include <assert.h> -#include "pastix.h" -#include "common.h" -#include "spm.h" -#include "z_spm.h" - -/** - ******************************************************************************* - * - * @ingroup pastix_spm_dev - * - * @brief Convert a sparse matrix with dofs into a sparse matrix without dofs. - * - * - ******************************************************************************* - * - * @param[in] spm - * The sparse matrix which needs to be converted - * - ******************************************************************************* - * - * @return - * \retval PASTIX_SUCCESS - * - *******************************************************************************/ -void -z_spmDofs2Flat(pastix_spm_t *spm) -{ - pastix_int_t i, j, k, ii, jj, dofi, dofj, col, row, baseval, cpt; - baseval = spmFindBase( spm ); - - pastix_int_t *new_col = calloc(spm->nexp+1,sizeof(pastix_int_t)); - pastix_int_t *new_row; - pastix_int_t *dofs = spm->dofs; - - pastix_complex64_t *new_vals; - pastix_complex64_t *vals = (pastix_complex64_t*)spm->values; - - switch(spm->mtxtype) - { - case PastixGeneral: - new_row = malloc(sizeof(pastix_int_t)*spm->nnzexp); - new_vals = malloc(sizeof(pastix_complex64_t)*spm->nnzexp); - for(i=0;i<spm->n ; i++) - { - col = ( spm->dof > 0 ) ? i : dofs[i]; - dofi = ( spm->dof > 0 ) ? spm->dof : dofs[i+1] - dofs[i]; - for(k=spm->colptr[i]-baseval; k<spm->colptr[i+1]-baseval; k++) - { - j = spm->rowptr[k]-baseval; - row = ( spm->dof > 0 ) ? j : dofs[j]; - dofj = ( spm->dof > 0 ) ? spm->dof : dofs[j+1] - dofs[j]; - for(ii=0; ii<dofi; ii++) - { - new_col[col+ii+1] += dofj; - } - } - } - - for(i=0; i<spm->nexp; i++) - { - new_col[i+1]+=new_col[i]; - } - - cpt = 0; - for(i=0; i < spm->n;i++) - { - col = ( spm->dof > 0 ) ? i : dofs[i]; - dofi = ( spm->dof > 0 ) ? spm->dof : dofs[i+1] - dofs[i]; - for(k=spm->colptr[i]-baseval ; k<spm->colptr[i+1]-baseval ;k++) - { - j = spm->rowptr[k] - baseval; - row = ( spm->dof > 0 ) ? j : dofs[j]; - dofj = ( spm->dof > 0 ) ? spm->dof : dofs[j+1] - dofs[j]; - for(ii=0;ii < dofi; ii++) - { - for(jj=0;jj < dofj ; jj++) - { - new_vals[new_col[col+ii]] = vals[cpt]; - new_row[new_col[col+ii]] = row + jj + baseval; - new_col[col+ii]++; - cpt++; - } - } - } - } - - { - int tmp; - int tmp1 = 0; - for(i=0; i<spm->nexp; i++) - { - tmp = new_col[i]; - new_col[i] = tmp1+baseval; - tmp1 = tmp; - } - new_col[i] += baseval; - } - spm->gN = spm->gNexp; - spm->n = spm->nexp; - spm->gnnz = spm->gnnzexp; - spm->nnz = spm->nnzexp; - - spm->dof = 1; - spm->dofs = NULL; - spm->layout = PastixColMajor; - - spm->colptr = new_col; - spm->rowptr = new_row; - //spm->loc2glob = NULL; // ? - spm->values = new_vals; - break; - - case PastixSymmetric: - for(i=0;i<spm->n ; i++) - { - col = ( spm->dof > 0 ) ? i : dofs[i]; - dofi = ( spm->dof > 0 ) ? spm->dof : dofs[i+1] - dofs[i]; - for(k=spm->colptr[i]-baseval; k<spm->colptr[i+1]-baseval; k++) - { - j = spm->rowptr[k]-baseval; - row = ( spm->dof > 0 ) ? j : dofs[j]; - dofj = ( spm->dof > 0 ) ? spm->dof : dofs[j+1] - dofs[j]; - for(ii=0; ii<dofi; ii++) - { - for(jj=0; jj<dofj; jj++) - { - if( i != j ) - new_col[col+ii+1] += 1; - else - if(ii <= jj ) - new_col[col+ii+1] += 1; - } - } - } - } - for(i=0; i<spm->nexp; i++) - { - new_col[i+1] += new_col[i]; - } - pastix_int_t nnz = new_col[spm->nexp]; - new_row = malloc(sizeof(pastix_int_t)*nnz); - new_vals = malloc(sizeof(pastix_complex64_t)*nnz); - - cpt = 0; - for(i=0; i < spm->n;i++) - { - col = ( spm->dof > 0 ) ? i : dofs[i]; - dofi = ( spm->dof > 0 ) ? spm->dof : dofs[i+1] - dofs[i]; - for(k=spm->colptr[i]-baseval ; k<spm->colptr[i+1]-baseval ;k++) - { - j = spm->rowptr[k] - baseval; - row = ( spm->dof > 0 ) ? j : dofs[j]; - dofj = ( spm->dof > 0 ) ? spm->dof : dofs[j+1] - dofs[j]; - for(ii=0;ii < dofi; ii++) - { - for(jj=0;jj < dofj ; jj++) - { - if( i == j ) - { - if ( ii <= jj ) - { - /* diagonal dominant for spd matrix - if( ii == jj) - new_vals[new_col[col+ii]] = 2*vals[cpt]; - else - */ - new_vals[new_col[col+ii]] = vals[cpt]; - new_row[new_col[col+ii]] = row + jj + baseval; - new_col[col+ii]++; - } - } - else - { - new_vals[new_col[col+ii]] = vals[cpt]; - new_row[new_col[col+ii]] = row + jj + baseval; - new_col[col+ii]++; - - } - cpt++; - } - } - } - } - { - int tmp; - int tmp1 = 0; - for(i=0; i<spm->nexp; i++) - { - tmp = new_col[i]; - new_col[i] = tmp1+baseval; - tmp1 = tmp; - } - new_col[i] += baseval; - } - spm->gN = spm->gNexp; - spm->n = spm->nexp; - spm->gnnz = nnz; - spm->nnz = nnz; - spm->gnnzexp = nnz; - spm->nnzexp = nnz; - - spm->dof = 1; - spm->dofs = NULL; - spm->layout = PastixColMajor; - - spm->colptr = new_col; - spm->rowptr = new_row; - //spm->loc2glob = NULL; // - spm->values = new_vals; - - break; - } - assert(spm->loc2glob == NULL);//to do -} diff --git a/z_spm_expand.c b/z_spm_expand.c index 160205c7..d0ae69ba 100644 --- a/z_spm_expand.c +++ b/z_spm_expand.c @@ -2,11 +2,12 @@ * * @file z_spm_expand.c * - * PaStiX spm routines - * PaStiX is a software package provided by Inria Bordeaux - Sud-Ouest, - * LaBRI, University of Bordeaux 1 and IPB. + * SParse Matrix package random multi-dof spm generator. * - * @version 5.1.0 + * @copyright 2016-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, + * Univ. Bordeaux. All rights reserved. + * + * @version 1.0.0 * @author Mathieu Faverge * @author Alban Bellot * @date 2015-01-01 @@ -22,18 +23,21 @@ * * @ingroup pastix_spm_dev * - * @brief TODO + * @brief Expand a single dof CSC to a multi-dofs CSC. * + * Each element matrix is fully initialized with the same element as the + * original one. * ******************************************************************************* * * @param[in] spm - * The sparse matrix which needs to be converted + * The original sparse CSC matrix used as the template for the + * muti-dof matrix. * ******************************************************************************* * - * @return - * \retval newspm + * @return The expanded CSC matrix according to the dofs properties previously + * set. * *******************************************************************************/ pastix_spm_t * @@ -204,17 +208,21 @@ z_spmCSCExpand(const pastix_spm_t *spm) * * @ingroup pastix_spm_dev * - * @brief TODO + * @brief Expand a single dof CSR to a multi-dofs CSR. + * + * Each element matrix is fully initialized with the same element as the + * original one. * ******************************************************************************* * * @param[in] spm - * The sparse matrix which needs to be converted + * The original sparse CSR matrix used as the template for the + * muti-dof matrix. * ******************************************************************************* * - * @return - * \retval newspm TODO + * @return The expanded CSR matrix according to the dofs properties previously + * set. * *******************************************************************************/ pastix_spm_t * @@ -383,17 +391,21 @@ z_spmCSRExpand(const pastix_spm_t *spm) * * @ingroup pastix_spm_dev * - * @brief TODO + * @brief Expand a single dof IJV to a multi-dofs IJV. + * + * Each element matrix is fully initialized with the same element as the + * original one. * ******************************************************************************* * * @param[in] spm - * The sparse matrix which needs to be converted + * The original sparse IJV matrix used as the template for the + * muti-dof matrix. * ******************************************************************************* * - * @return - * \retval newspm TODO + * @return The expanded IJV matrix according to the dofs properties previously + * set. * *******************************************************************************/ pastix_spm_t * @@ -552,17 +564,20 @@ z_spmIJVExpand(const pastix_spm_t *spm) * * @ingroup pastix_spm_dev * - * @brief TODO + * @brief Expand a single dof sparse matrix to a multi-dofs sparse matrix. + * + * The original value of the element is replicated through the entire element + * matrix that is generated in this routine. * ******************************************************************************* * * @param[in] spm - * The sparse matrix which needs to be converted + * The original sparse IJV matrix used as the template for the + * muti-dof matrix. * ******************************************************************************* * - * @return - * \retval PASTIX_SUCCESS + * @return The expanded matrix according to the dofs properties previously set. * *******************************************************************************/ pastix_spm_t * diff --git a/z_spm_genrhs.c b/z_spm_genrhs.c index 3da90ec8..6e2983dc 100644 --- a/z_spm_genrhs.c +++ b/z_spm_genrhs.c @@ -2,11 +2,12 @@ * * @file z_spm_genrhs.c * - * PaStiX spm routines - * PaStiX is a software package provided by Inria Bordeaux - Sud-Ouest, - * LaBRI, University of Bordeaux 1 and IPB. + * SParse Matrix package right hand side generators. * - * @version 5.1.0 + * @copyright 2016-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, + * Univ. Bordeaux. All rights reserved. + * + * @version 1.0.0 * @author Mathieu Faverge * @author Theophile Terraz * @date 2015-01-01 @@ -38,18 +39,18 @@ static pastix_complex64_t zzero = (pastix_complex64_t) 0.; * * @ingroup pastix_spm_dev * - * @brief TODO + * @brief Random generator from the HPL library * ******************************************************************************* * * @param[in] n + * Number of element to jump over in the generator cycle. * * @param[in] seed * ******************************************************************************* * - * @return - * \retval ran + * @retval a random integer value * *******************************************************************************/ static inline unsigned long long int @@ -84,12 +85,12 @@ Rnd64_jump(unsigned long long int n, unsigned long long int seed ) { * * @ingroup pastix_spm_dev * - * z_spmRndVect generates a random vector for testing purpose. + * @brief Generate a vector of random values. * ******************************************************************************* * * @param[in] scale - * TODO + * Scaling factor for each randomized values. * * @param[in] m * The number of rows of the tile A. m >= 0. @@ -118,8 +119,9 @@ Rnd64_jump(unsigned long long int n, unsigned long long int seed ) { * all tiles initialized with this routine. * ******************************************************************************/ -void z_spmRndVect( double scale, int m, int n, pastix_complex64_t *A, int lda, - int gM, int m0, int n0, unsigned long long int seed ) +void +z_spmRndVect( double scale, int m, int n, pastix_complex64_t *A, int lda, + int gM, int m0, int n0, unsigned long long int seed ) { pastix_complex64_t *tmp = A; int64_t i, j; @@ -148,7 +150,7 @@ void z_spmRndVect( double scale, int m, int n, pastix_complex64_t *A, int lda, * * @ingroup pastix_spm_dev * - * z_spmGenRHS - Generate nrhs right hand side vectors associated to a given + * @brief Generate nrhs right hand side vectors associated to a given * matrix to test a problem with a solver. * ******************************************************************************* @@ -186,9 +188,8 @@ void z_spmRndVect( double scale, int m, int n, pastix_complex64_t *A, int lda, * ******************************************************************************* * - * @return - * \retval PASTIX_SUCCESS if the b vector has been computed succesfully, - * \retval PASTIX_ERR_BADPARAMETER otherwise. + * @retval PASTIX_SUCCESS if the b vector has been computed succesfully, + * @retval PASTIX_ERR_BADPARAMETER otherwise. * *******************************************************************************/ int @@ -309,8 +310,7 @@ z_spmGenRHS( int type, int nrhs, * * @ingroup pastix_spm_dev * - * z_spmCheckAxb - Check the backward error, and the forward error if x0 is - * provided. + * @brief Check the backward error, and the forward error if x0 is provided. * ******************************************************************************* * @@ -346,9 +346,8 @@ z_spmGenRHS( int type, int nrhs, * ******************************************************************************* * - * @return - * \retval PASTIX_SUCCESS if the b vector has been computed succesfully, - * \retval PASTIX_ERR_BADPARAMETER otherwise. + * @retval PASTIX_SUCCESS if the b vector has been computed succesfully, + * @retval PASTIX_ERR_BADPARAMETER otherwise. * *******************************************************************************/ int diff --git a/z_spm_integer.c b/z_spm_integer.c index aa82fc28..a2dce680 100644 --- a/z_spm_integer.c +++ b/z_spm_integer.c @@ -2,9 +2,10 @@ * * @file z_spm_integer.c * - * PaStiX spm routines - * PaStiX is a software package provided by Inria Bordeaux - Sud-Ouest, - * LaBRI, University of Bordeaux 1 and IPB. + * SParse Matrix package integer sorting routines. + * + * @copyright 2016-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, + * Univ. Bordeaux. All rights reserved. * * @version 1.0.0 * @author Francois Pellegrini diff --git a/z_spm_laplacian.c b/z_spm_laplacian.c index eeb5b21d..5d8dbccc 100644 --- a/z_spm_laplacian.c +++ b/z_spm_laplacian.c @@ -1,7 +1,10 @@ /** * @file z_spm_laplacian.c * - * $COPYRIGHTS$ + * SParse Matrix package laplacian generator routines. + * + * @copyright 2016-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, + * Univ. Bordeaux. All rights reserved. * * @version 1.0.0 * @author Mathieu Faverge diff --git a/z_spm_matrixvector.c b/z_spm_matrixvector.c index 9a7009d1..05b503bb 100644 --- a/z_spm_matrixvector.c +++ b/z_spm_matrixvector.c @@ -2,11 +2,12 @@ * * @file z_spm_matrixvector.c * - * PaStiX spm routines - * PaStiX is a software package provided by Inria Bordeaux - Sud-Ouest, - * LaBRI, University of Bordeaux 1 and IPB. + * SParse Matrix package matrix-vector multiplication routines. * - * @version 5.1.0 + * @copyright 2016-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, + * Univ. Bordeaux. All rights reserved. + * + * @version 1.0.0 * @author Mathieu Faverge * @author Theophile Terraz * @date 2015-01-01 @@ -57,9 +58,8 @@ * ******************************************************************************* * - * @return - * \retval PASTIX_SUCCESS if the y vector has been computed succesfully, - * \retval PASTIX_ERR_BADPARAMETER otherwise. + * @retval PASTIX_SUCCESS if the y vector has been computed succesfully, + * @retval PASTIX_ERR_BADPARAMETER otherwise. * *******************************************************************************/ int @@ -179,9 +179,8 @@ z_spmGeCSCv(const pastix_trans_t trans, * ******************************************************************************* * - * @return - * \retval PASTIX_SUCCESS if the y vector has been computed succesfully, - * \retval PASTIX_ERR_BADPARAMETER otherwise. + * @retval PASTIX_SUCCESS if the y vector has been computed succesfully, + * @retval PASTIX_ERR_BADPARAMETER otherwise. * *******************************************************************************/ int @@ -268,9 +267,8 @@ z_spmSyCSCv( pastix_complex64_t alpha, * ******************************************************************************* * - * @return - * \retval PASTIX_SUCCESS if the y vector has been computed succesfully, - * \retval PASTIX_ERR_BADPARAMETER otherwise. + * @retval PASTIX_SUCCESS if the y vector has been computed succesfully, + * @retval PASTIX_ERR_BADPARAMETER otherwise. * *******************************************************************************/ int @@ -362,9 +360,8 @@ z_spmHeCSCv( pastix_complex64_t alpha, * ******************************************************************************* * - * @return - * \retval PASTIX_SUCCESS if the y vector has been computed succesfully, - * \retval PASTIX_ERR_BADPARAMETER otherwise. + * @retval PASTIX_SUCCESS if the y vector has been computed succesfully, + * @retval PASTIX_ERR_BADPARAMETER otherwise. * *******************************************************************************/ int diff --git a/z_spm_norm.c b/z_spm_norm.c index e64fc46b..6432e18f 100644 --- a/z_spm_norm.c +++ b/z_spm_norm.c @@ -1,10 +1,10 @@ /** * @file z_spm_norm.c * - * PaStiX spm computational routines. + * SParse Matrix package norm routine. * - * PaStiX is a software package provided by Inria Bordeaux - Sud-Ouest, - * LaBRI, University of Bordeaux 1 and IPB. + * @copyright 2016-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, + * Univ. Bordeaux. All rights reserved. * * @version 1.0.0 * @author Mathieu Faverge @@ -23,8 +23,6 @@ /** ******************************************************************************* * - * @ingroup pastix_spm_dev - * * @brief Compute the Frobenius norm of the non distributed given * spm structure. * @@ -37,8 +35,7 @@ * ******************************************************************************* * - * @return - * The computed norm + * @return The computed frobenius norm * *******************************************************************************/ double @@ -114,8 +111,6 @@ z_spmFrobeniusNorm( const pastix_spm_t *spm ) /** ******************************************************************************* * - * @ingroup pastix_spm_dev - * * @brief Compute the Max norm of the non distributed given spm * structure. * @@ -128,8 +123,7 @@ z_spmFrobeniusNorm( const pastix_spm_t *spm ) * ******************************************************************************* * - * @return - * The computed norm + * @return The computed max norm * *******************************************************************************/ double @@ -150,8 +144,6 @@ z_spmMaxNorm( const pastix_spm_t *spm ) /** ******************************************************************************* * - * @ingroup pastix_spm_dev - * * @brief Compute the Infinity norm of the non distributed given spm * structure given by the maximum column sum. * @@ -164,8 +156,7 @@ z_spmMaxNorm( const pastix_spm_t *spm ) * ******************************************************************************* * - * @return - * The computed norm + * @return The computed infinity norm * *******************************************************************************/ double @@ -268,9 +259,7 @@ z_spmInfNorm( const pastix_spm_t *spm ) /** ******************************************************************************* * - * @ingroup pastix_spm_dev - * - * @brief Compute the Oneinity norm of the non distributed given spm + * @brief Compute the one norm of the non distributed given spm * structure fiven by the maximum row sum * * ||A|| = max_j( sum_i(|a_ij|) ) @@ -282,8 +271,7 @@ z_spmInfNorm( const pastix_spm_t *spm ) * ******************************************************************************* * - * @return - * The computed norm + * @return The computed one norm * *******************************************************************************/ double @@ -382,8 +370,6 @@ z_spmOneNorm( const pastix_spm_t *spm ) /** ******************************************************************************* * - * @ingroup pastix_spm_dev - * * @brief Compute the norm of an spm matrix * ******************************************************************************* @@ -399,13 +385,12 @@ z_spmOneNorm( const pastix_spm_t *spm ) * ******************************************************************************* * - * @return - * \retval The norm of the matrix spm + * @return The norm of the spm matrix * *******************************************************************************/ double z_spmNorm( int ntype, - const pastix_spm_t *spm) + const pastix_spm_t *spm ) { double norm = 0.; diff --git a/z_spm_print.c b/z_spm_print.c index e6b6bcbb..d0c8c2f0 100644 --- a/z_spm_print.c +++ b/z_spm_print.c @@ -2,9 +2,12 @@ * * @file z_spm_print.c * - * Convert a sparse matrix into a dense matrix. + * SParse Matrix package printing routines. * - * @version 5.1.0 + * @copyright 2016-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, + * Univ. Bordeaux. All rights reserved. + * + * @version 1.0.0 * @author Mathieu Faverge * @author Theophile Terraz * @author Alban Bellot diff --git a/z_spm_scal.c b/z_spm_scal.c index 220b066a..5536e8a9 100644 --- a/z_spm_scal.c +++ b/z_spm_scal.c @@ -1,10 +1,10 @@ /** * @file z_spm_scal.c * - * PaStiX spm computational routines. + * SParse Matrix package scaling routine. * - * PaStiX is a software package provided by Inria Bordeaux - Sud-Ouest, - * LaBRI, University of Bordeaux 1 and IPB. + * @copyright 2016-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, + * Univ. Bordeaux. All rights reserved. * * @version 1.0.0 * @author Mathieu Faverge @@ -31,7 +31,7 @@ * @param[in] alpha * The scaling parameter. * - * @param[in,out] spm + * @param[inout] spm * The spm which needs to be scaled. * *******************************************************************************/ -- GitLab