Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
eigenpy
Commits
aacde161
Commit
aacde161
authored
Jan 11, 2018
by
jcarpent
Browse files
[Core] Move stride to a dedicated file
parent
1054dce9
Changes
4
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
aacde161
...
...
@@ -98,6 +98,7 @@ SET(HEADERS
registration.hpp
angle-axis.hpp
quaternion.hpp
stride.hpp
ref.hpp
)
...
...
src/map.hpp
View file @
aacde161
...
...
@@ -17,6 +17,7 @@
#include
"eigenpy/fwd.hpp"
#include
<numpy/arrayobject.h>
#include
"eigenpy/exception.hpp"
#include
"eigenpy/stride.hpp"
namespace
eigenpy
{
...
...
src/ref.hpp
View file @
aacde161
...
...
@@ -18,6 +18,7 @@
#define __eigenpy_ref_hpp__
#include
"eigenpy/fwd.hpp"
#include
"eigenpy/stride.hpp"
// For old Eigen versions, EIGEN_DEVICE_FUNC is not defined.
// We must define it just in the scope of this file.
...
...
@@ -27,18 +28,7 @@
namespace
eigenpy
{
template
<
typename
MatType
,
int
IsVectorAtCompileTime
=
MatType
::
IsVectorAtCompileTime
>
struct
StrideType
{
typedef
Eigen
::
Stride
<
Eigen
::
Dynamic
,
Eigen
::
Dynamic
>
type
;
};
template
<
typename
MatType
>
struct
StrideType
<
MatType
,
1
>
{
typedef
Eigen
::
InnerStride
<
Eigen
::
Dynamic
>
type
;
};
template
<
typename
PlainObjectType
>
struct
Ref
:
Eigen
::
Ref
<
PlainObjectType
,
EIGENPY_DEFAULT_ALIGNMENT_VALUE
,
typename
StrideType
<
PlainObjectType
>::
type
>
{
...
...
src/stride.hpp
0 → 100644
View file @
aacde161
/*
* Copyright 2018, Justin Carpentier <jcarpent@laas.fr>, LAAS-CNRS
*
* This file is part of eigenpy.
* eigenpy is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
* eigenpy is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. You should
* have received a copy of the GNU Lesser General Public License along
* with eigenpy. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __eigenpy_stride_hpp__
#define __eigenpy_stride_hpp__
#include
<Eigen/Core>
namespace
eigenpy
{
template
<
typename
MatType
,
int
IsVectorAtCompileTime
=
MatType
::
IsVectorAtCompileTime
>
struct
StrideType
{
typedef
Eigen
::
Stride
<
Eigen
::
Dynamic
,
Eigen
::
Dynamic
>
type
;
};
template
<
typename
MatType
>
struct
StrideType
<
MatType
,
1
>
{
typedef
Eigen
::
InnerStride
<
Eigen
::
Dynamic
>
type
;
};
}
#endif // ifndef __eigenpy_stride_hpp__
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment