10 #ifndef EIGEN_LAPACKE_HELPERS_H
11 #define EIGEN_LAPACKE_HELPERS_H
17 #include "mkl_lapacke.h"
28 namespace lapacke_helpers {
35 template <
typename Scalar>
55 template <
typename Scalar>
60 template <
typename Source,
typename Target = translated_type<Source>>
67 template <
typename Source,
typename Target = translated_type<Source>>
77 template <
typename Derived>
96 template <
typename DoubleFn,
typename SingleFn,
typename DoubleCpxFn,
typename SingleCpxFn>
106 template <
typename... Args>
111 template <
typename... Args>
116 template <
typename... Args>
121 template <
typename... Args>
131 template <
typename DoubleFn,
typename SingleFn,
typename DoubleCpxFn,
typename SingleCpxFn,
typename... Args>
134 return helper.
call(std::forward<Args>(
args)...);
142 #define EIGEN_MAKE_LAPACKE_WRAPPER(FUNCTION) \
143 template <typename... Args> \
144 EIGEN_ALWAYS_INLINE auto FUNCTION(Args &&...args) { \
145 return call_wrapper(LAPACKE_d##FUNCTION, LAPACKE_s##FUNCTION, LAPACKE_z##FUNCTION, LAPACKE_c##FUNCTION, \
146 std::forward<Args>(args)...); \
158 #undef EIGEN_MAKE_LAPACKE_WRAPPER
#define EIGEN_ALWAYS_INLINE
Definition: Macros.h:845
#define EIGEN_CONSTEXPR
Definition: Macros.h:758
#define LAPACK_COL_MAJOR
Definition: lapacke.h:124
#define lapack_int
Definition: lapacke.h:52
#define LAPACK_ROW_MAJOR
Definition: lapacke.h:123
#define lapack_complex_double
Definition: lapacke.h:94
#define lapack_complex_float
Definition: lapacke.h:79
#define EIGEN_MAKE_LAPACKE_WRAPPER(FUNCTION)
Definition: lapacke_helpers.h:142
@ Target
Definition: Constants.h:495
EIGEN_ALWAYS_INLINE auto to_lapack(Source value)
Definition: lapacke_helpers.h:61
typename translate_type_imp< Scalar >::type translated_type
Given an Eigen types, this is defined to be the corresponding, layout-compatible lapack type.
Definition: lapacke_helpers.h:56
EIGEN_ALWAYS_INLINE EIGEN_CONSTEXPR lapack_int lapack_storage_of(const EigenBase< Derived > &)
translates storage order of the given Eigen object to the corresponding lapack constant
Definition: lapacke_helpers.h:78
EIGEN_ALWAYS_INLINE auto call_wrapper(DoubleFn df, SingleFn sf, DoubleCpxFn dcf, SingleCpxFn scf, Args &&...args)
Definition: lapacke_helpers.h:132
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:70
squared absolute value
Definition: GlobalFunctions.h:87
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:83
args
Definition: compute_granudrum_aor.py:143
Definition: Eigen_Colamd.h:49
Definition: EigenBase.h:33
Helper type to facilitate the wrapping of raw LAPACKE functions for different types into a single,...
Definition: lapacke_helpers.h:97
auto call(Args &&...args) -> decltype(double_(std::forward< Args >(args)...))
Definition: lapacke_helpers.h:107
DoubleCpxFn double_cpx_
Definition: lapacke_helpers.h:103
SingleFn single_
Definition: lapacke_helpers.h:102
DoubleFn double_
Definition: lapacke_helpers.h:101
auto call(Args &&...args) -> decltype(single_(std::forward< Args >(args)...))
Definition: lapacke_helpers.h:112
SingleCpxFn single_cpx_
Definition: lapacke_helpers.h:104
auto call(Args &&...args) -> decltype(double_cpx_(std::forward< Args >(args)...))
Definition: lapacke_helpers.h:117
auto call(Args &&...args) -> decltype(single_cpx_(std::forward< Args >(args)...))
Definition: lapacke_helpers.h:122
float type
Definition: lapacke_helpers.h:39
lapack_complex_double type
Definition: lapacke_helpers.h:47
lapack_complex_float type
Definition: lapacke_helpers.h:51
Definition: lapacke_helpers.h:36
Definition: datatypes.h:12