diff --git a/dune/xt/common/lapacke.cc b/dune/xt/common/lapacke.cc index 8949ed3b2e69e3a3dc1942fe89f5c6ddd8b1ba04..107ee7c4aa8bc2134e5e3385d1417bd52033b38b 100644 --- a/dune/xt/common/lapacke.cc +++ b/dune/xt/common/lapacke.cc @@ -198,6 +198,26 @@ int dorgqr(int matrix_layout, int m, int n, int k, double* a, int lda, const dou } +int dorgqr_work(int matrix_layout, int m, int n, int k, double* a, int lda, const double* tau, double* work, int lwork) +{ +#if HAVE_MKL || HAVE_LAPACKE + return LAPACKE_dorgqr_work(matrix_layout, m, n, k, a, lda, tau, work, lwork); +#else + DUNE_UNUSED_PARAMETER(matrix_layout); + DUNE_UNUSED_PARAMETER(m); + DUNE_UNUSED_PARAMETER(n); + DUNE_UNUSED_PARAMETER(k); + DUNE_UNUSED_PARAMETER(a); + DUNE_UNUSED_PARAMETER(lda); + DUNE_UNUSED_PARAMETER(tau); + DUNE_UNUSED_PARAMETER(work); + DUNE_UNUSED_PARAMETER(lwork); + DUNE_THROW(Exceptions::dependency_missing, "You are missing lapacke or the intel mkl, check available() first!"); + return 1; +#endif +} + + int dormqr(int matrix_layout, char side, char trans, @@ -348,6 +368,24 @@ int zgeqp3(int matrix_layout, int m, int n, std::complex<double>* a, int lda, in } +int zungqr(int matrix_layout, int m, int n, int k, std::complex<double>* a, int lda, const std::complex<double>* tau) +{ +#if HAVE_MKL || HAVE_LAPACKE + return LAPACKE_zungqr(matrix_layout, m, n, k, a, lda, tau); +#else + DUNE_UNUSED_PARAMETER(matrix_layout); + DUNE_UNUSED_PARAMETER(m); + DUNE_UNUSED_PARAMETER(n); + DUNE_UNUSED_PARAMETER(k); + DUNE_UNUSED_PARAMETER(a); + DUNE_UNUSED_PARAMETER(lda); + DUNE_UNUSED_PARAMETER(tau); + DUNE_THROW(Exceptions::dependency_missing, "You are missing lapacke or the intel mkl, check available() first!"); + return 1; +#endif +} + + int zunmqr(int matrix_layout, char side, char trans, diff --git a/dune/xt/common/lapacke.hh b/dune/xt/common/lapacke.hh index ad3ad8e91aeafeee89325f40814a393f996376b5..8f18c25d5fe32145deb4a3aad4c4b9f7cfef63b9 100644 --- a/dune/xt/common/lapacke.hh +++ b/dune/xt/common/lapacke.hh @@ -90,12 +90,19 @@ int dgeqp3(int matrix_layout, int m, int n, double* a, int lda, int* jpvt, doubl */ int dgeqp3_work(int matrix_layout, int m, int n, double* a, int lda, int* jpvt, double* tau, double* work, int lwork); + /** * \brief Wrapper around LAPACKE_dorgqr - * \sa LAPACKE_dorqqr + * \sa LAPACKE_dorgqr */ int dorgqr(int matrix_layout, int m, int n, int k, double* a, int lda, const double* tau); +/** + * \brief Wrapper around LAPACKE_dorgqr_work + * \sa LAPACKE_dorgqr_work + */ +int dorgqr_work(int matrix_layout, int m, int n, int k, double* a, int lda, const double* tau, double* work, int lwork); + /** * \brief Wrapper around LAPACKE_dormqr @@ -184,6 +191,13 @@ int zunmqr(int matrix_layout, int ldc); +/** + * \brief Wrapper around LAPACKE_zungqr + * \sa LAPACKE_zungqr + */ +int zungqr(int matrix_layout, int m, int n, int k, std::complex<double>* a, int lda, const std::complex<double>* tau); + + } // namespace Lapacke namespace Blas {