Eigen::internal::lapacke_helpers Namespace Reference

Implementation details and helper functions for the lapacke glue code. More...

Classes

struct  rank_update
 
struct  rank_update< Lower >
 
struct  rank_update< Upper >
 
struct  lapacke_llt
 
struct  lapacke_partial_lu
 
struct  translate_type_imp
 
struct  translate_type_imp< float >
 
struct  translate_type_imp< double >
 
struct  translate_type_imp< std::complex< double > >
 
struct  translate_type_imp< std::complex< float > >
 
struct  WrappingHelper
 Helper type to facilitate the wrapping of raw LAPACKE functions for different types into a single, overloaded C++ function. This is achieved in combination with \r EIGEN_MAKE_LAPACKE_WRAPPER. More...
 
struct  lapacke_hqr
 
class  BDCSVD_LAPACKE
 

Typedefs

template<typename Scalar >
using translated_type = typename translate_type_imp< Scalar >::type
 Given an Eigen types, this is defined to be the corresponding, layout-compatible lapack type. More...
 

Functions

template<typename Source , typename Target = translated_type<Source>>
EIGEN_ALWAYS_INLINE auto to_lapack (Source value)
 
template<typename Source , typename Target = translated_type<Source>>
EIGEN_ALWAYS_INLINE auto to_lapack (Source *value)
 
EIGEN_ALWAYS_INLINE lapack_int to_lapack (Index index)
 
template<typename Derived >
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 More...
 
template<typename DoubleFn , typename SingleFn , typename DoubleCpxFn , typename SingleCpxFn , typename... Args>
EIGEN_ALWAYS_INLINE auto call_wrapper (DoubleFn df, SingleFn sf, DoubleCpxFn dcf, SingleCpxFn scf, Args &&...args)
 
template<typename MatrixType_ , int Options>
BDCSVD< MatrixType_, Options > & BDCSVD_wrapper (BDCSVD< MatrixType_, Options > &svd, const MatrixType_ &matrix, int computationOptions)
 

Detailed Description

Implementation details and helper functions for the lapacke glue code.

Typedef Documentation

◆ translated_type

template<typename Scalar >
using Eigen::internal::lapacke_helpers::translated_type = typedef typename translate_type_imp<Scalar>::type

Given an Eigen types, this is defined to be the corresponding, layout-compatible lapack type.

Function Documentation

◆ BDCSVD_wrapper()

template<typename MatrixType_ , int Options>
BDCSVD<MatrixType_, Options>& Eigen::internal::lapacke_helpers::BDCSVD_wrapper ( BDCSVD< MatrixType_, Options > &  svd,
const MatrixType_ &  matrix,
int  computationOptions 
)
125  {
126  // we need to move to the wrapper type and back
127  BDCSVD_LAPACKE<MatrixType_, Options> tmpSvd(std::move(svd));
128  tmpSvd.compute_impl_lapacke(matrix, computationOptions);
129  svd = std::move(tmpSvd);
130  return svd;
131 }
cout<< "Here is the matrix m:"<< endl<< m<< endl;JacobiSVD< MatrixXf, ComputeThinU|ComputeThinV > svd(m)
Eigen::Map< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor >, 0, Eigen::OuterStride<> > matrix(T *data, int rows, int cols, int stride)
Definition: common.h:85

References Eigen::internal::lapacke_helpers::BDCSVD_LAPACKE< MatrixType_, Options >::compute_impl_lapacke(), matrix(), and svd().

◆ call_wrapper()

template<typename DoubleFn , typename SingleFn , typename DoubleCpxFn , typename SingleCpxFn , typename... Args>
EIGEN_ALWAYS_INLINE auto Eigen::internal::lapacke_helpers::call_wrapper ( DoubleFn  df,
SingleFn  sf,
DoubleCpxFn  dcf,
SingleCpxFn  scf,
Args &&...  args 
)

Helper function that generates a WrappingHelper object with the given function pointers and invokes its call method, thus selecting one of the overloads.

See also
EIGEN_MAKE_LAPACKE_WRAPPER
132  {
133  WrappingHelper<DoubleFn, SingleFn, DoubleCpxFn, SingleCpxFn> helper{df, sf, dcf, scf};
134  return helper.call(std::forward<Args>(args)...);
135 }
args
Definition: compute_granudrum_aor.py:143

References compute_granudrum_aor::args, and Eigen::internal::lapacke_helpers::WrappingHelper< DoubleFn, SingleFn, DoubleCpxFn, SingleCpxFn >::call().

◆ lapack_storage_of()

template<typename Derived >
EIGEN_ALWAYS_INLINE EIGEN_CONSTEXPR lapack_int Eigen::internal::lapacke_helpers::lapack_storage_of ( const EigenBase< Derived > &  )

translates storage order of the given Eigen object to the corresponding lapack constant

78  {
79  return Derived::IsRowMajor ? LAPACK_ROW_MAJOR : LAPACK_COL_MAJOR;
80 }
#define LAPACK_COL_MAJOR
Definition: lapacke.h:124
#define LAPACK_ROW_MAJOR
Definition: lapacke.h:123

References LAPACK_COL_MAJOR, and LAPACK_ROW_MAJOR.

Referenced by Eigen::internal::lapacke_helpers::BDCSVD_LAPACKE< MatrixType_, Options >::compute_impl_lapacke(), Eigen::internal::lapacke_helpers::lapacke_llt< Scalar, Mode >::EIGEN_STATIC_ASSERT(), and Eigen::internal::lapacke_helpers::lapacke_hqr< MatrixQR, HCoeffs >::run().

◆ to_lapack() [1/3]

EIGEN_ALWAYS_INLINE lapack_int Eigen::internal::lapacke_helpers::to_lapack ( Index  index)

This function converts the Eigen Index to a lapack index, with possible range checks

See also
internal::convert_index
74 { return convert_index<lapack_int>(index); }

◆ to_lapack() [2/3]

template<typename Source , typename Target = translated_type<Source>>
EIGEN_ALWAYS_INLINE auto Eigen::internal::lapacke_helpers::to_lapack ( Source value)

This function performs conversions for pointer types corresponding to the translations abovce. This is valid because the translations are between layout-compatible types.

68  {
69  return reinterpret_cast<Target *>(value);
70 }
@ Target
Definition: Constants.h:495
squared absolute value
Definition: GlobalFunctions.h:87

References Eigen::Architecture::Target, and Eigen::value.

◆ to_lapack() [3/3]

template<typename Source , typename Target = translated_type<Source>>
EIGEN_ALWAYS_INLINE auto Eigen::internal::lapacke_helpers::to_lapack ( Source  value)