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
b083d753
Verified
Commit
b083d753
authored
4 years ago
by
Justin Carpentier
Browse files
Options
Downloads
Patches
Plain Diff
core: add inline
parent
56179677
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/eigenpy/user-type.hpp
+15
-15
15 additions, 15 deletions
include/eigenpy/user-type.hpp
with
15 additions
and
15 deletions
include/eigenpy/user-type.hpp
+
15
−
15
View file @
b083d753
...
...
@@ -16,13 +16,13 @@ namespace eigenpy
template
<
typename
T
,
int
type_code
=
NumpyEquivalentType
<
T
>
::
type_code
>
struct
SpecialMethods
{
static
void
copyswap
(
void
*
/*dst*/
,
void
*
/*src*/
,
int
/*swap*/
,
void
*
/*arr*/
)
{}
;
static
PyObject
*
getitem
(
void
*
/*ip*/
,
void
*
/*ap*/
)
{
return
NULL
;
};
static
int
setitem
(
PyObject
*
/*op*/
,
void
*
/*ov*/
,
void
*
/*ap*/
)
{
return
-
1
;
}
static
void
copyswapn
(
void
*
/*dest*/
,
long
/*dstride*/
,
void
*
/*src*/
,
long
/*sstride*/
,
long
/*n*/
,
int
/*swap*/
,
void
*
/*arr*/
)
{}
;
static
npy_bool
nonzero
(
void
*
/*ip*/
,
void
*
/*array*/
)
{
return
(
npy_bool
)
false
;
};
static
void
dotfunc
(
void
*
/*ip0_*/
,
npy_intp
/*is0*/
,
void
*
/*ip1_*/
,
npy_intp
/*is1*/
,
inline
static
void
copyswap
(
void
*
/*dst*/
,
void
*
/*src*/
,
int
/*swap*/
,
void
*
/*arr*/
)
/*{}*/
;
inline
static
PyObject
*
getitem
(
void
*
/*ip*/
,
void
*
/*ap*/
)
/*
{ return NULL; }
*/
;
inline
static
int
setitem
(
PyObject
*
/*op*/
,
void
*
/*ov*/
,
void
*
/*ap*/
)
/*
{ return -1; }
*/
;
inline
static
void
copyswapn
(
void
*
/*dest*/
,
long
/*dstride*/
,
void
*
/*src*/
,
long
/*sstride*/
,
long
/*n*/
,
int
/*swap*/
,
void
*
/*arr*/
)
/*{}*/
;
inline
static
npy_bool
nonzero
(
void
*
/*ip*/
,
void
*
/*array*/
)
/*
{ return (npy_bool)false; }
*/
;
inline
static
void
dotfunc
(
void
*
/*ip0_*/
,
npy_intp
/*is0*/
,
void
*
/*ip1_*/
,
npy_intp
/*is1*/
,
void
*
/*op*/
,
npy_intp
/*n*/
,
void
*
/*arr*/
);
// static void cast(void * /*from*/, void * /*to*/, npy_intp /*n*/, void * /*fromarr*/, void * /*toarr*/) {};
};
...
...
@@ -30,7 +30,7 @@ namespace eigenpy
template
<
typename
T
>
struct
SpecialMethods
<
T
,
NPY_USERDEF
>
{
static
void
copyswap
(
void
*
dst
,
void
*
src
,
int
swap
,
void
*
/*arr*/
)
inline
static
void
copyswap
(
void
*
dst
,
void
*
src
,
int
swap
,
void
*
/*arr*/
)
{
// std::cout << "copyswap" << std::endl;
if
(
src
!=
NULL
)
...
...
@@ -48,7 +48,7 @@ namespace eigenpy
}
}
static
PyObject
*
getitem
(
void
*
ip
,
void
*
ap
)
inline
static
PyObject
*
getitem
(
void
*
ip
,
void
*
ap
)
{
// std::cout << "getitem" << std::endl;
PyArrayObject
*
py_array
=
static_cast
<
PyArrayObject
*>
(
ap
);
...
...
@@ -68,7 +68,7 @@ namespace eigenpy
}
}
static
int
setitem
(
PyObject
*
src_obj
,
void
*
dest_ptr
,
void
*
array
)
inline
static
int
setitem
(
PyObject
*
src_obj
,
void
*
dest_ptr
,
void
*
array
)
{
// std::cout << "setitem" << std::endl;
if
(
array
==
NULL
)
...
...
@@ -103,8 +103,8 @@ namespace eigenpy
return
0
;
}
static
void
copyswapn
(
void
*
dst
,
long
dstride
,
void
*
src
,
long
sstride
,
long
n
,
int
swap
,
void
*
array
)
inline
static
void
copyswapn
(
void
*
dst
,
long
dstride
,
void
*
src
,
long
sstride
,
long
n
,
int
swap
,
void
*
array
)
{
// std::cout << "copyswapn" << std::endl;
...
...
@@ -122,7 +122,7 @@ namespace eigenpy
}
}
static
npy_bool
nonzero
(
void
*
ip
,
void
*
array
)
inline
static
npy_bool
nonzero
(
void
*
ip
,
void
*
array
)
{
// std::cout << "nonzero" << std::endl;
static
const
T
ZeroValue
=
T
(
0
);
...
...
@@ -141,8 +141,8 @@ namespace eigenpy
}
}
static
void
dotfunc
(
void
*
ip0_
,
npy_intp
is0
,
void
*
ip1_
,
npy_intp
is1
,
void
*
op
,
npy_intp
n
,
void
*
/*arr*/
)
inline
static
void
dotfunc
(
void
*
ip0_
,
npy_intp
is0
,
void
*
ip1_
,
npy_intp
is1
,
void
*
op
,
npy_intp
n
,
void
*
/*arr*/
)
{
T
res
=
T
(
0
);
char
*
ip0
=
(
char
*
)
ip0_
,
*
ip1
=
(
char
*
)
ip1_
;
...
...
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