Skip to content
Snippets Groups Projects
Commit 27fc54d0 authored by Tobias Leibner's avatar Tobias Leibner
Browse files

[lapacke] add MKL vdExp

parent a0885a07
No related branches found
No related tags found
No related merge requests found
...@@ -18,8 +18,7 @@ ...@@ -18,8 +18,7 @@
#define lapack_complex_double std::complex<double> #define lapack_complex_double std::complex<double>
#if HAVE_MKL #if HAVE_MKL
#include <mkl_cblas.h> #include <mkl.h>
#include <mkl_lapacke.h>
#else // HAVE_MKL #else // HAVE_MKL
#if HAVE_LAPACKE #if HAVE_LAPACKE
#include <lapacke.h> #include <lapacke.h>
...@@ -38,6 +37,21 @@ ...@@ -38,6 +37,21 @@
namespace Dune { namespace Dune {
namespace XT { namespace XT {
namespace Common { namespace Common {
namespace Mkl {
void exp(const int n, const double* a, double* y)
{
#if HAVE_MKL
vdExp(n, a, y);
#else
for (int ii = 0; ii < n; ++ii)
y[ii] = std::exp(a[ii]);
#endif
}
} // namespace Mkl
namespace Lapacke { namespace Lapacke {
......
...@@ -17,6 +17,17 @@ ...@@ -17,6 +17,17 @@
namespace Dune { namespace Dune {
namespace XT { namespace XT {
namespace Common { namespace Common {
namespace Mkl {
/**
* \brief Wrapper around MKL's vdExp
* \sa vdExp
*/
void exp(const int n, const double* a, double* y);
} // namespace Mkl
namespace Lapacke { namespace Lapacke {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment