details.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2014-2019, CNRS
3  * Copyright 2018-2024, INRIA
4  */
5 
6 #ifndef __eigenpy_details_hpp__
7 #define __eigenpy_details_hpp__
8 
9 #include "eigenpy/fwd.hpp"
13 #include "eigenpy/eigenpy.hpp"
14 #include "eigenpy/exception.hpp"
15 #include "eigenpy/numpy-type.hpp"
16 #include "eigenpy/registration.hpp"
18 
19 namespace eigenpy {
20 
21 template <typename EigenType,
22  typename BaseType = typename get_eigen_base_type<EigenType>::type,
23  typename Scalar = typename EigenType::Scalar>
25 
26 template <typename MatType, typename Scalar>
27 struct expose_eigen_type_impl<MatType, Eigen::MatrixBase<MatType>, Scalar> {
28  static void run() {
29  if (check_registration<MatType>()) return;
30 
31  // to-python
33 #if EIGEN_VERSION_AT_LEAST(3, 2, 0)
36 #endif
37 
38  // from-python
40  }
41 };
42 
43 template <typename MatType, typename Scalar>
44 struct expose_eigen_type_impl<MatType, Eigen::SparseMatrixBase<MatType>,
45  Scalar> {
46  static void run() {
47  if (check_registration<MatType>()) return;
48 
49  // to-python
51  // #if EIGEN_VERSION_AT_LEAST(3, 2, 0)
52  // EigenToPyConverter<Eigen::Ref<MatType> >::registration();
53  // EigenToPyConverter<const Eigen::Ref<const MatType> >::registration();
54  // #endif
55 
56  // from-python
58  }
59 };
60 
61 #ifdef EIGENPY_WITH_TENSOR_SUPPORT
62 template <typename TensorType, typename Scalar>
63 struct expose_eigen_type_impl<TensorType, Eigen::TensorBase<TensorType>,
64  Scalar> {
65  static void run() {
66  if (check_registration<TensorType>()) return;
67 
68  // to-python
70  EigenToPyConverter<Eigen::TensorRef<TensorType> >::registration();
71  EigenToPyConverter<
72  const Eigen::TensorRef<const TensorType> >::registration();
73 
74  // from-python
75  EigenFromPyConverter<TensorType>::registration();
76  }
77 };
78 #endif
79 
80 template <typename MatType>
83 }
84 
85 } // namespace eigenpy
86 
87 #endif // ifndef __eigenpy_details_hpp__
Eigen
Definition: complex.cpp:7
eigenpy::enableEigenPySpecific
void enableEigenPySpecific()
Definition: details.hpp:81
registration.hpp
fwd.hpp
scalar-conversion.hpp
eigen-from-python.hpp
eigenpy::get_eigen_base_type::type
boost::mpl::if_< boost::is_const< typename boost::remove_reference< EigenType >::type >, const _type, _type >::type type
Definition: fwd.hpp:165
eigenpy::expose_eigen_type_impl
Definition: details.hpp:24
eigenpy
Definition: alignment.hpp:14
eigen-to-python.hpp
eigen-allocator.hpp
eigenpy::EigenToPyConverter::registration
static void registration()
Definition: eigen-to-python.hpp:167
eigenpy::expose_eigen_type_impl< MatType, Eigen::SparseMatrixBase< MatType >, Scalar >::run
static void run()
Definition: details.hpp:46
omniidl_be_python_with_docstring.run
def run(tree, args)
Definition: omniidl_be_python_with_docstring.py:140
eigenpy.hpp
eigenpy::expose_eigen_type_impl< MatType, Eigen::MatrixBase< MatType >, Scalar >::run
static void run()
Definition: details.hpp:28
exception.hpp
numpy-type.hpp
eigenpy::EigenToPyConverter
Definition: eigen-to-python.hpp:166
eigenpy::EigenFromPyConverter
Definition: eigen-from-python.hpp:423


eigenpy
Author(s): Justin Carpentier, Nicolas Mansard
autogenerated on Sat Nov 2 2024 02:14:45