eigenpy.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2014-2019, CNRS
3  * Copyright 2018-2024, INRIA
4  */
5 
6 #ifndef __eigenpy_eigenpy_hpp__
7 #define __eigenpy_eigenpy_hpp__
8 
9 #include "eigenpy/fwd.hpp"
11 #include "eigenpy/expose.hpp"
12 
15 
16 #define ENABLE_SPECIFIC_MATRIX_TYPE(TYPE) \
17  ::eigenpy::enableEigenPySpecific<TYPE>();
18 
19 namespace eigenpy {
20 
21 /* Enable Eigen-Numpy serialization for a set of standard MatrixBase instance.
22  */
23 void EIGENPY_DLLAPI enableEigenPy();
24 
25 bool EIGENPY_DLLAPI withTensorSupport();
26 
27 /* Enable the Eigen--Numpy serialization for the templated MatType class.*/
28 template <typename MatType>
30 
31 template <typename Scalar, int Options>
32 EIGEN_DONT_INLINE void exposeType() {
33  EIGENPY_MAKE_TYPEDEFS_ALL_SIZES(Scalar, Options, s);
34 
35  EIGENPY_UNUSED_TYPE(Vector1s);
36  EIGENPY_UNUSED_TYPE(RowVector1s);
38 
40  ENABLE_SPECIFIC_MATRIX_TYPE(RowVector2s);
42  ENABLE_SPECIFIC_MATRIX_TYPE(Matrix2Xs);
43  ENABLE_SPECIFIC_MATRIX_TYPE(MatrixX2s);
44 
46  ENABLE_SPECIFIC_MATRIX_TYPE(RowVector3s);
48  ENABLE_SPECIFIC_MATRIX_TYPE(Matrix3Xs);
49  ENABLE_SPECIFIC_MATRIX_TYPE(MatrixX3s);
50 
52  ENABLE_SPECIFIC_MATRIX_TYPE(RowVector4s);
54  ENABLE_SPECIFIC_MATRIX_TYPE(Matrix4Xs);
55  ENABLE_SPECIFIC_MATRIX_TYPE(MatrixX4s);
56 
58  ENABLE_SPECIFIC_MATRIX_TYPE(RowVectorXs);
60 
61  enableEigenPySpecific<SparseMatrixXs>();
62 }
63 
64 template <typename Scalar>
65 EIGEN_DONT_INLINE void exposeType() {
66  exposeType<Scalar, 0>();
67 
68 #ifdef EIGENPY_WITH_TENSOR_SUPPORT
69  enableEigenPySpecific<Eigen::Tensor<Scalar, 1> >();
70  enableEigenPySpecific<Eigen::Tensor<Scalar, 2> >();
71  enableEigenPySpecific<Eigen::Tensor<Scalar, 3> >();
72 #endif
73 }
74 
75 } // namespace eigenpy
76 
77 #include "eigenpy/details.hpp"
78 
79 #endif // ifndef __eigenpy_eigenpy_hpp__
eigenpy::enableEigenPySpecific
void enableEigenPySpecific()
Definition: details.hpp:81
eigenpy::exposeType
EIGEN_DONT_INLINE void exposeType()
Definition: eigenpy.hpp:32
std-unique-ptr.hpp
eigenpy::enableEigenPy
void EIGENPY_DLLAPI enableEigenPy()
Definition: eigenpy.cpp:42
fwd.hpp
EIGENPY_UNUSED_TYPE
#define EIGENPY_UNUSED_TYPE(type)
Definition: fwd.hpp:112
eigenpy
Definition: alignment.hpp:14
eigen-typedef.hpp
eigenpy::withTensorSupport
bool EIGENPY_DLLAPI withTensorSupport()
Definition: eigenpy.cpp:89
ENABLE_SPECIFIC_MATRIX_TYPE
#define ENABLE_SPECIFIC_MATRIX_TYPE(TYPE)
Custom CallPolicies.
Definition: eigenpy.hpp:16
EIGENPY_MAKE_TYPEDEFS_ALL_SIZES
#define EIGENPY_MAKE_TYPEDEFS_ALL_SIZES(Type, Options, TypeSuffix)
Definition: eigen-typedef.hpp:27
details.hpp
expose.hpp


eigenpy
Author(s): Justin Carpentier, Nicolas Mansard
autogenerated on Fri Apr 26 2024 02:17:35