Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
eigenpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stack Of Tasks
eigenpy
Commits
ead61d9f
Verified
Commit
ead61d9f
authored
3 years ago
by
Justin Carpentier
Browse files
Options
Downloads
Patches
Plain Diff
core: fix allocate for const Eigen::Ref<const ...
parent
80b1fd72
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/eigenpy/numpy-allocator.hpp
+4
-6
4 additions, 6 deletions
include/eigenpy/numpy-allocator.hpp
with
4 additions
and
6 deletions
include/eigenpy/numpy-allocator.hpp
+
4
−
6
View file @
ead61d9f
/*
/*
* Copyright 2020 INRIA
* Copyright 2020
-2022
INRIA
*/
*/
#ifndef __eigenpy_numpy_allocator_hpp__
#ifndef __eigenpy_numpy_allocator_hpp__
...
@@ -116,13 +116,11 @@ template <typename MatType, int Options, typename Stride>
...
@@ -116,13 +116,11 @@ template <typename MatType, int Options, typename Stride>
struct
NumpyAllocator
<
const
Eigen
::
Ref
<
const
MatType
,
Options
,
Stride
>
>
{
struct
NumpyAllocator
<
const
Eigen
::
Ref
<
const
MatType
,
Options
,
Stride
>
>
{
typedef
const
Eigen
::
Ref
<
const
MatType
,
Options
,
Stride
>
RefType
;
typedef
const
Eigen
::
Ref
<
const
MatType
,
Options
,
Stride
>
RefType
;
template
<
typename
SimilarMatrixType
>
static
PyArrayObject
*
allocate
(
RefType
&
mat
,
npy_intp
nd
,
npy_intp
*
shape
)
{
static
PyArrayObject
*
allocate
(
RefType
&
mat
,
npy_intp
nd
,
npy_intp
*
shape
)
{
typedef
typename
SimilarMatrix
Type
::
Scalar
Scalar
;
typedef
typename
Ref
Type
::
Scalar
Scalar
;
enum
{
enum
{
NPY_ARRAY_MEMORY_CONTIGUOUS_RO
=
SimilarMatrixType
::
IsRowMajor
NPY_ARRAY_MEMORY_CONTIGUOUS_RO
=
?
NPY_ARRAY_CARRAY_RO
RefType
::
IsRowMajor
?
NPY_ARRAY_CARRAY_RO
:
NPY_ARRAY_FARRAY_RO
:
NPY_ARRAY_FARRAY_RO
};
};
if
(
NumpyType
::
sharedMemory
())
{
if
(
NumpyType
::
sharedMemory
())
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment