Newer
Older

Mathieu Faverge
committed
/**
*
* @file z_spm.h
*
* SParse Matrix package precision dependent header.

Mathieu Faverge
committed
*
* @copyright 2016-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* Univ. Bordeaux. All rights reserved.
*
* @version 1.0.0

Mathieu Faverge
committed
* @author Xavier Lacoste
* @author Theophile Terraz
* @author Pierre Ramet
* @author Mathieu Faverge
* @date 2013-06-24
*
* @precisions normal z -> c d s p
*
**/
#ifndef _z_spm_h_
#define _z_spm_h_

Mathieu Faverge
committed

Mathieu Faverge
committed
/**
* Integer routines
*/
void z_spmIntSortAsc(void ** const pbase, const pastix_int_t n);

Mathieu Faverge
committed
int z_spmConvertCSC2CSR( pastix_spm_t *spm );
int z_spmConvertCSC2IJV( pastix_spm_t *spm );
int z_spmConvertCSR2CSC( pastix_spm_t *spm );
int z_spmConvertCSR2IJV( pastix_spm_t *spm );
int z_spmConvertIJV2CSC( pastix_spm_t *spm );
int z_spmConvertIJV2CSR( pastix_spm_t *spm );

Mathieu Faverge
committed
pastix_complex64_t *z_spm2dense( const pastix_spm_t *spm );
/**
* Matrix-Vector and matrix-matrix product routines
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_spmCSCMatMat(const pastix_trans_t trans, pastix_int_t n, const void *alpha, const pastix_spm_t *A, const void *B, pastix_int_t ldb, const void *beta, void *Cptr, pastix_int_t ldc );
/**
* Norm computation routines
*/
double z_spmNorm( int ntype, const pastix_spm_t *spm );

Mathieu Faverge
committed
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 );

Mathieu Faverge
committed
int z_spmGenRHS(pastix_rhstype_t type, int nrhs, const pastix_spm_t *spm, void *x, int ldx, void *b, int ldb );

Mathieu Faverge
committed
int z_spmCheckAxb( pastix_fixdbl_t eps, int nrhs, const pastix_spm_t *spm, void *x0, int ldx0, void *b, int ldb, const void *x, int ldx );

Mathieu Faverge
committed
void z_spmDensePrint( FILE *f, pastix_int_t m, pastix_int_t n, const pastix_complex64_t *A, pastix_int_t lda );
void z_spmPrint( FILE *f, const pastix_spm_t *spm );
pastix_spm_t *z_spmExpand(const pastix_spm_t *spm);
void z_spmDofExtend(pastix_spm_t *spm);
void z_spmScal( const double alpha, pastix_spm_t *spm );