From 4ef4e39e4eee1c53f8cea47394c7a92bf07dd0a8 Mon Sep 17 00:00:00 2001 From: Mathieu Faverge <mathieu.faverge@inria.fr> Date: Wed, 6 Dec 2017 15:26:06 +0100 Subject: [PATCH] Change interface of spmScal functions --- spm.c | 10 +++++----- spm.h | 2 +- z_spm.h | 2 +- z_spm_scal.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/spm.c b/spm.c index 1a662a70..c654fefc 100644 --- a/spm.c +++ b/spm.c @@ -1397,17 +1397,17 @@ spmCheckAxb( pastix_int_t nrhs, * *******************************************************************************/ void -spmScalMatrix(const pastix_complex64_t alpha, pastix_spm_t* spm) +spmScalMatrix(const double alpha, pastix_spm_t* spm) { switch(spm->flttype) { case PastixPattern: break; case PastixFloat: - s_spmScal(alpha, spm); + s_spmScal((float)alpha, spm); break; case PastixComplex32: - c_spmScal(alpha, spm); + c_spmScal((float)alpha, spm); break; case PastixComplex64: z_spmScal(alpha, spm); @@ -1445,10 +1445,10 @@ spmScalVector(const double alpha, pastix_spm_t* spm, void *x) case PastixPattern: break; case PastixFloat: - cblas_sscal(spm->n, alpha, x, 1); + cblas_sscal(spm->n, (float)alpha, x, 1); break; case PastixComplex32: - cblas_csscal(spm->n, alpha, x, 1); + cblas_csscal(spm->n, (float)alpha, x, 1); break; case PastixComplex64: cblas_zdscal(spm->n, alpha, x, 1); diff --git a/spm.h b/spm.h index d763b921..6d547bf7 100644 --- a/spm.h +++ b/spm.h @@ -105,7 +105,7 @@ void spmGenFakeValues( pastix_spm_t *spm ); */ double spmNorm( pastix_normtype_t ntype, const pastix_spm_t *spm ); int spmMatVec( pastix_trans_t trans, const void *alpha, const pastix_spm_t *spm, const void *x, const void *beta, void *y ); -void spmScalMatrix( const pastix_complex64_t alpha, pastix_spm_t *spm ); +void spmScalMatrix( const double alpha, pastix_spm_t *spm ); void spmScalVector( const double alpha, pastix_spm_t *spm, void *x ); /** diff --git a/z_spm.h b/z_spm.h index b70bb2ff..3e7507ff 100644 --- a/z_spm.h +++ b/z_spm.h @@ -65,7 +65,7 @@ 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 pastix_complex64_t alpha, pastix_spm_t *spm ); +void z_spmScal( const double alpha, pastix_spm_t *spm ); #endif /* _z_spm_h_ */ diff --git a/z_spm_scal.c b/z_spm_scal.c index 50428b4f..1e568bd4 100644 --- a/z_spm_scal.c +++ b/z_spm_scal.c @@ -36,7 +36,7 @@ * *******************************************************************************/ void -z_spmScal( const pastix_complex64_t alpha, pastix_spm_t *spm ) +z_spmScal( const double alpha, pastix_spm_t *spm ) { pastix_int_t nnz, i; pastix_complex64_t *values; -- GitLab