File tree Expand file tree Collapse file tree 4 files changed +41
-12
lines changed Expand file tree Collapse file tree 4 files changed +41
-12
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,7 @@ SET(HEADERS
9898 registration.hpp
9999 angle-axis.hpp
100100 quaternion.hpp
101+ stride .hpp
101102 ref.hpp
102103)
103104
Original file line number Diff line number Diff line change 1717#include " eigenpy/fwd.hpp"
1818#include < numpy/arrayobject.h>
1919#include " eigenpy/exception.hpp"
20+ #include " eigenpy/stride.hpp"
2021
2122namespace eigenpy
2223{
Original file line number Diff line number Diff line change 1818#define __eigenpy_ref_hpp__
1919
2020#include " eigenpy/fwd.hpp"
21+ #include " eigenpy/stride.hpp"
2122
2223// For old Eigen versions, EIGEN_DEVICE_FUNC is not defined.
2324// We must define it just in the scope of this file.
2728
2829namespace eigenpy
2930{
30- template <typename MatType, int IsVectorAtCompileTime = MatType::IsVectorAtCompileTime>
31- struct StrideType
32- {
33- typedef Eigen::Stride<Eigen::Dynamic,Eigen::Dynamic> type;
34- };
35-
36- template <typename MatType>
37- struct StrideType <MatType,1 >
38- {
39- typedef Eigen::InnerStride<Eigen::Dynamic> type;
40- };
41-
31+
4232 template <typename PlainObjectType>
4333 struct Ref : Eigen::Ref<PlainObjectType,EIGENPY_DEFAULT_ALIGNMENT_VALUE,typename StrideType<PlainObjectType>::type>
4434 {
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2018, Justin Carpentier <[email protected] >, LAAS-CNRS 3+ *
4+ * This file is part of eigenpy.
5+ * eigenpy is free software: you can redistribute it and/or
6+ * modify it under the terms of the GNU Lesser General Public License
7+ * as published by the Free Software Foundation, either version 3 of
8+ * the License, or (at your option) any later version.
9+ * eigenpy is distributed in the hope that it will be
10+ * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
11+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+ * GNU Lesser General Public License for more details. You should
13+ * have received a copy of the GNU Lesser General Public License along
14+ * with eigenpy. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+ #ifndef __eigenpy_stride_hpp__
18+ #define __eigenpy_stride_hpp__
19+
20+ #include < Eigen/Core>
21+
22+ namespace eigenpy
23+ {
24+ template <typename MatType, int IsVectorAtCompileTime = MatType::IsVectorAtCompileTime>
25+ struct StrideType
26+ {
27+ typedef Eigen::Stride<Eigen::Dynamic,Eigen::Dynamic> type;
28+ };
29+
30+ template <typename MatType>
31+ struct StrideType <MatType,1 >
32+ {
33+ typedef Eigen::InnerStride<Eigen::Dynamic> type;
34+ };
35+ }
36+
37+ #endif // ifndef __eigenpy_stride_hpp__
You can’t perform that action at this time.
0 commit comments