eigenpy
3.13.0
Bindings between Numpy and Eigen using Boost.Python
Toggle main menu visibility
Loading...
Searching...
No Matches
stride.hpp
1
/*
2
* Copyright 2014-2019, CNRS
3
* Copyright 2018-2023, INRIA
4
*/
5
6
#ifndef __eigenpy_stride_hpp__
7
#define __eigenpy_stride_hpp__
8
9
#include <eigenpy/fwd.hpp>
10
11
namespace
eigenpy
{
12
13
template
<
typename
MatType,
int
InnerStride,
int
OuterStride,
14
bool
IsVectorAtCompileTime = MatType::IsVectorAtCompileTime>
15
struct
stride_type_matrix
{
16
typedef
Eigen::Stride<OuterStride, InnerStride> type;
17
};
18
19
template
<
typename
MatType,
int
InnerStr
id
e,
int
OuterStr
id
e>
20
struct
stride_type_matrix
<MatType, InnerStride, OuterStride, true> {
21
typedef
Eigen::InnerStride<InnerStride> type;
22
};
23
24
template
<
typename
EigenType,
int
InnerStride,
int
OuterStride,
25
typename
BaseType =
typename
get_eigen_base_type<EigenType>::type>
26
struct
stride_type
;
27
28
template
<
typename
MatrixType,
int
InnerStr
id
e,
int
OuterStr
id
e>
29
struct
stride_type
<MatrixType, InnerStride, OuterStride,
30
Eigen::MatrixBase<MatrixType>> {
31
typedef
32
typename
stride_type_matrix<MatrixType, InnerStride, OuterStride>::type
33
type;
34
};
35
36
template
<
typename
MatrixType,
int
InnerStr
id
e,
int
OuterStr
id
e>
37
struct
stride_type
<const MatrixType, InnerStride, OuterStride,
38
const Eigen::MatrixBase<MatrixType>> {
39
typedef
typename
stride_type_matrix
<
const
MatrixType, InnerStride,
40
OuterStride>::type type;
41
};
42
43
#ifdef EIGENPY_WITH_TENSOR_SUPPORT
44
template
<
typename
TensorType,
int
InnerStr
id
e,
int
OuterStr
id
e>
45
struct
stride_type
<TensorType, InnerStride, OuterStride,
46
Eigen::TensorBase<TensorType>> {
47
typedef
Eigen::Stride<OuterStride, InnerStride>
type
;
48
};
49
50
template
<
typename
TensorType,
int
InnerStr
id
e,
int
OuterStr
id
e>
51
struct
stride_type<const TensorType, InnerStride, OuterStride,
52
const Eigen::TensorBase<TensorType>> {
53
typedef
Eigen::Stride<OuterStride, InnerStride> type;
54
};
55
#endif
56
57
template
<
typename
EigenType,
int
InnerStride = Eigen::Dynamic,
58
int
OuterStride = Eigen::Dynamic>
59
struct
StrideType
{
60
typedef
typename
stride_type<EigenType, InnerStride, OuterStride>::type
type;
61
};
62
63
}
// namespace eigenpy
64
65
#endif
// ifndef __eigenpy_stride_hpp__
eigenpy
Definition
alignment.hpp:14
eigenpy::StrideType
Definition
stride.hpp:59
eigenpy::type
eigenpy::stride_type_matrix
Definition
stride.hpp:15
eigenpy::stride_type
Definition
stride.hpp:26
include
eigenpy
stride.hpp
Generated by
1.17.0