]> https://gitweb.dealii.org/ - dealii.git/commitdiff
add trmv LAPACK wrapper
authorDenis Davydov <davydden@gmail.com>
Tue, 5 Dec 2017 17:03:00 +0000 (18:03 +0100)
committerDenis Davydov <davydden@gmail.com>
Tue, 5 Dec 2017 17:03:00 +0000 (18:03 +0100)
include/deal.II/lac/lapack_templates.h

index ab5b50cf84fbde9e2fedadc83585964d473ae85d..956e232e82a0780c401b98a19afff69100781607 100644 (file)
@@ -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 <typename number>
+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 <typename number1, typename number2, typename number3, typename number4, typename number5>
 inline void

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.