From 89775f142da1846289f0644a70ab0aa1389f48c5 Mon Sep 17 00:00:00 2001 From: Tobias Leibner <tobias.leibner@googlemail.com> Date: Wed, 26 Sep 2018 17:18:21 +0200 Subject: [PATCH] [lapacke] add dlamch --- .gitsuper | 14 +++++++------- dune/xt/common/lapacke.cc | 10 ++++++++++ dune/xt/common/lapacke.hh | 6 ++++++ 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/.gitsuper b/.gitsuper index bf199787d..2f4588433 100644 --- a/.gitsuper +++ b/.gitsuper @@ -4,7 +4,7 @@ status = 1a3bcab04b011a5d6e44f9983cae6ff89fa695e8 bin (heads/master) 20a673b9dad7e2e25bd97defa8849debb59d247c config.opts (heads/master) 8f2c5aba441417bf2c42f22272f538c68a89cc4a dune-alugrid (remotes/origin/releases/2.5) 707acf201d5a754c80f87cc4d71aa36bf29a6e3f dune-common (v2.5.1-9-g707acf20) - +f263305405cf8379370e8a6efc5aa44cf9d30d82 dune-gdt (heads/entropy_flux_even_newer) + +2297e29b2ee7a2b252308d2de6bb4ba76217fdd9 dune-gdt (heads/entropy_flux_even_newer) 390a2c503783bbed778a8ff610f8c5ca09c238d0 dune-geometry (v2.5.1-5-g390a2c5) d7b20bbc5f6fdcfc312beb0ea5d16d39ea26904e dune-grid (v2.5.1-2-gd7b20bbc5) 9e29a333e8af02382d80b95335a784d5ce1ea2c8 dune-grid-glue (v2.4.0-70-g9e29a33) @@ -14,13 +14,13 @@ status = 1a3bcab04b011a5d6e44f9983cae6ff89fa695e8 bin (heads/master) 741e4f8e53bdd3e1b6e19d84eb22b6e3dc48526c dune-python (remotes/origin/releases/2.5) 26cc8cb4161a3a51002ab2a81b8c81d2c951ee79 dune-testtools (remotes/origin/p/renemilk/testname_listing_hack_no-skiptest) 0a74e7dd0b2115778a5d490dab08a2ed07fcaa1e dune-uggrid (v2.5.2) - +6b26af1ac8f489e09a9037bff1ea7fdbc4a721d4 dune-xt-common (heads/dailywork_tleibner) - f93419066883a68c4e0ba96acc3d451ba971876a dune-xt-data (heads/dailywork_tleibner) + 7858844e1a7b0498c24fdaecb81735d29b038bd6 dune-xt-common (heads/dailywork_tleibner) + 8668818754df182fd73cec1538c0bbe233c8851c dune-xt-data (heads/master) 83b29cbe84d0af6579d6904f59598ad3dd132996 dune-xt-functions (heads/dailywork_tleibner) d4d2b463a75b557fdec45069c1f43b20b40b6265 dune-xt-grid (heads/master) +4e2fd1d11bad4a9a0cf60889713ffea3b4cbddab dune-xt-la (heads/remove_cow) 09d0378f616b94d68bcdd9fc6114813181849ec0 scripts (heads/master) -commit = ef28eca2f8b5ee893dfb81411fd26750a99248c8 +commit = 573602f12ace9f679a7f99fe262938b2f5693ebf [submodule.bin] remote = git@github.com:dune-community/local-bin.git @@ -45,7 +45,7 @@ commit = 707acf201d5a754c80f87cc4d71aa36bf29a6e3f [submodule.dune-gdt] remote = git@github.com:dune-community/dune-gdt.git status = 2424627f0ad5de7e4aaa5e7f48bc2a02414d95a1 .vcsetup (heads/master) -commit = f263305405cf8379370e8a6efc5aa44cf9d30d82 +commit = 2297e29b2ee7a2b252308d2de6bb4ba76217fdd9 [submodule.dune-geometry] remote = git@github.com:dune-community/dune-geometry.git @@ -95,12 +95,12 @@ commit = 0a74e7dd0b2115778a5d490dab08a2ed07fcaa1e [submodule.dune-xt-common] remote = git@github.com:dune-community/dune-xt-common.git status = 2424627f0ad5de7e4aaa5e7f48bc2a02414d95a1 .vcsetup (heads/master) -commit = 6b26af1ac8f489e09a9037bff1ea7fdbc4a721d4 +commit = 7858844e1a7b0498c24fdaecb81735d29b038bd6 [submodule.dune-xt-data] remote = git@github.com:dune-community/dune-xt-data status = 2424627f0ad5de7e4aaa5e7f48bc2a02414d95a1 .vcsetup (heads/master) -commit = f93419066883a68c4e0ba96acc3d451ba971876a +commit = 8668818754df182fd73cec1538c0bbe233c8851c [submodule.dune-xt-functions] remote = git@github.com:dune-community/dune-xt-functions.git diff --git a/dune/xt/common/lapacke.cc b/dune/xt/common/lapacke.cc index 67a127b2e..e922cdcf5 100644 --- a/dune/xt/common/lapacke.cc +++ b/dune/xt/common/lapacke.cc @@ -303,6 +303,16 @@ int dgesvd(int DXTC_LAPACKE_ONLY(matrix_layout), #endif } +double dlamch(char cmach) +{ +#if HAVE_MKL || HAVE_LAPACKE + return LAPACKE_dlamch(cmach); +#else + DUNE_THROW(Exceptions::dependency_missing, "You are missing lapacke or the intel mkl, check available() first!"); + return 1.; +#endif +} + int dorgqr(int DXTC_LAPACKE_ONLY(matrix_layout), int DXTC_LAPACKE_ONLY(m), int DXTC_LAPACKE_ONLY(n), diff --git a/dune/xt/common/lapacke.hh b/dune/xt/common/lapacke.hh index 39acc0793..7392b13d1 100644 --- a/dune/xt/common/lapacke.hh +++ b/dune/xt/common/lapacke.hh @@ -173,6 +173,12 @@ int dgesvd(int matrix_layout, int ldvt, double* superb); +/** + * \brief Wrapper around LAPACKE_dlamch + * \sa LAPACKE_dlamch + */ +double dlamch(char cmach); + /** * \brief Wrapper around LAPACKE_dorgqr * \sa LAPACKE_dorgqr -- GitLab