eigenpy.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2014-2019, CNRS
3  * Copyright 2018-2023, 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 
13 #define ENABLE_SPECIFIC_MATRIX_TYPE(TYPE) \
14  ::eigenpy::enableEigenPySpecific<TYPE>();
15 
16 namespace eigenpy {
17 
18 /* Enable Eigen-Numpy serialization for a set of standard MatrixBase instance.
19  */
20 void EIGENPY_DLLAPI enableEigenPy();
21 
22 bool EIGENPY_DLLAPI withTensorSupport();
23 
24 /* Enable the Eigen--Numpy serialization for the templated MatType class.*/
25 template <typename MatType>
27 
28 template <typename Scalar, int Options>
29 EIGEN_DONT_INLINE void exposeType() {
30  EIGENPY_MAKE_TYPEDEFS_ALL_SIZES(Scalar, Options, s);
31 
32  EIGENPY_UNUSED_TYPE(Vector1s);
33  EIGENPY_UNUSED_TYPE(RowVector1s);
35 
37  ENABLE_SPECIFIC_MATRIX_TYPE(RowVector2s);
39  ENABLE_SPECIFIC_MATRIX_TYPE(Matrix2Xs);
40  ENABLE_SPECIFIC_MATRIX_TYPE(MatrixX2s);
41 
43  ENABLE_SPECIFIC_MATRIX_TYPE(RowVector3s);
45  ENABLE_SPECIFIC_MATRIX_TYPE(Matrix3Xs);
46  ENABLE_SPECIFIC_MATRIX_TYPE(MatrixX3s);
47 
49  ENABLE_SPECIFIC_MATRIX_TYPE(RowVector4s);
51  ENABLE_SPECIFIC_MATRIX_TYPE(Matrix4Xs);
52  ENABLE_SPECIFIC_MATRIX_TYPE(MatrixX4s);
53 
55  ENABLE_SPECIFIC_MATRIX_TYPE(RowVectorXs);
57 }
58 
59 template <typename Scalar>
60 EIGEN_DONT_INLINE void exposeType() {
61  exposeType<Scalar, 0>();
62 
63 #ifdef EIGENPY_WITH_TENSOR_SUPPORT
64  enableEigenPySpecific<Eigen::Tensor<Scalar, 1> >();
65  enableEigenPySpecific<Eigen::Tensor<Scalar, 2> >();
66  enableEigenPySpecific<Eigen::Tensor<Scalar, 3> >();
67 #endif
68 }
69 
70 } // namespace eigenpy
71 
72 #include "eigenpy/details.hpp"
73 
74 #endif // ifndef __eigenpy_eigenpy_hpp__
eigenpy::enableEigenPySpecific
void enableEigenPySpecific()
Definition: details.hpp:63
eigenpy::exposeType
EIGEN_DONT_INLINE void exposeType()
Definition: eigenpy.hpp:29
eigenpy::enableEigenPy
void EIGENPY_DLLAPI enableEigenPy()
Definition: eigenpy.cpp:29
fwd.hpp
EIGENPY_UNUSED_TYPE
#define EIGENPY_UNUSED_TYPE(type)
Definition: fwd.hpp:110
eigenpy
Definition: alignment.hpp:14
eigen-typedef.hpp
eigenpy::withTensorSupport
bool EIGENPY_DLLAPI withTensorSupport()
Definition: eigenpy.cpp:63
ENABLE_SPECIFIC_MATRIX_TYPE
#define ENABLE_SPECIFIC_MATRIX_TYPE(TYPE)
Definition: eigenpy.hpp:13
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 Tue Jan 23 2024 03:15:01