From: Denis Davydov Date: Tue, 5 Dec 2017 17:03:00 +0000 (+0100) Subject: add trmv LAPACK wrapper X-Git-Tag: v9.0.0-rc1~684^2~4 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5ffdaa95b3c6dbcd3369d2e8dcb0b35b316545a;p=dealii.git add trmv LAPACK wrapper --- diff --git a/include/deal.II/lac/lapack_templates.h b/include/deal.II/lac/lapack_templates.h index ab5b50cf84..956e232e82 100644 --- a/include/deal.II/lac/lapack_templates.h +++ b/include/deal.II/lac/lapack_templates.h @@ -37,6 +37,12 @@ extern "C" const float *alpha, const float *A, const int *lda, const float *x, const int *incx, const float *b, float *y, const int *incy); + void dtrmv_ (const char *uplo, const char *trans, const char *diag, + const int *N, const double *A, const int *lda, + double *x, const int *incx); + void strmv_ (const char *uplo, const char *trans, const char *diag, + const int *N, const float *A, const int *lda, + float *x, const int *incx); // Matrix matrix product void dgemm_ (const char *transa, const char *transb, const int *m, const int *n, const int *k, @@ -354,6 +360,56 @@ gemv (const char *, const int *, const int *, const float *, const float *, cons #endif + +/// Template wrapper for LAPACK functions dtrmv and strmv +template +inline void +trmv (const char *uplo, const char *trans, const char *diag, + const int *N, const number *A, const int *lda, + number *x, const int *incx) +{ + Assert (false, ExcNotImplemented()); +} + +#ifdef DEAL_II_WITH_LAPACK +inline void +trmv (const char *uplo, const char *trans, const char *diag, + const int *N, const double *A, const int *lda, + double *x, const int *incx) +{ + dtrmv_ (uplo, trans, diag, N, A, lda, x, incx); +} +#else +inline void +trmv (const char *uplo, const char *trans, const char *diag, + const int *N, const double *A, const int *lda, + double *x, const int *incx) +{ + Assert (false, LAPACKSupport::ExcMissing("dtrmv")); +} +#endif + + +#ifdef DEAL_II_WITH_LAPACK +inline void +trmv (const char *uplo, const char *trans, const char *diag, + const int *N, const float *A, const int *lda, + float *x, const int *incx) +{ + strmv_ (uplo, trans, diag, N, A, lda, x, incx); +} +#else +inline void +trmv (const char *uplo, const char *trans, const char *diag, + const int *N, const float *A, const int *lda, + float *x, const int *incx) +{ + Assert (false, LAPACKSupport::ExcMissing("dtrmv")); +} +#endif + + + /// Template wrapper for LAPACK functions dgemm and sgemm template inline void