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
71a329d1
Commit
71a329d1
authored
May 09, 2022
by
Wilson Jallet
🎬
Browse files
numpy-allocator: extend row vector fix to const<EigenRef>
parent
1fe931f0
Pipeline
#18579
passed with stage
in 11 minutes and 40 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
include/eigenpy/numpy-allocator.hpp
View file @
71a329d1
...
...
@@ -135,10 +135,11 @@ struct NumpyAllocator<const Eigen::Ref<const MatType, Options, Stride> > {
if
(
NumpyType
::
sharedMemory
())
{
const
int
Scalar_type_code
=
Register
::
getTypeCode
<
Scalar
>
();
Eigen
::
DenseIndex
inner_stride
=
MatType
::
IsRowMajor
?
mat
.
outerStride
()
:
mat
.
innerStride
(),
outer_stride
=
MatType
::
IsRowMajor
?
mat
.
innerStride
()
:
mat
.
outerStride
();
const
bool
reverse_strides
=
MatType
::
IsRowMajor
||
(
mat
.
rows
()
==
1
);
Eigen
::
DenseIndex
inner_stride
=
reverse_strides
?
mat
.
outerStride
()
:
mat
.
innerStride
(),
outer_stride
=
reverse_strides
?
mat
.
innerStride
()
:
mat
.
outerStride
();
const
int
elsize
=
call_PyArray_DescrFromType
(
Scalar_type_code
)
->
elsize
;
npy_intp
strides
[
2
]
=
{
elsize
*
inner_stride
,
elsize
*
outer_stride
};
...
...
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