Skip to content
GitLab
Menu
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
pinocchio
Commits
49e07418
Verified
Commit
49e07418
authored
Oct 11, 2019
by
Justin Carpentier
Browse files
bench: adjust w.r.t. new API
parent
a1d9f00f
Changes
1
Hide whitespace changes
Inline
Side-by-side
benchmark/timings.cpp
View file @
49e07418
...
@@ -29,8 +29,8 @@ EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(Eigen::VectorXd)
...
@@ -29,8 +29,8 @@ EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(Eigen::VectorXd)
namespace
pinocchio
namespace
pinocchio
{
{
template
<
typename
Scalar
,
int
Options
,
template
<
typename
,
int
>
class
JointCollectionTpl
>
template
<
typename
Scalar
,
int
Options
,
template
<
typename
,
int
>
class
JointCollectionTpl
>
struct
EmptyForwardStep
struct
EmptyForwardStep
UnaryVisit
:
fusion
::
JointUnaryVisitorBase
<
EmptyForwardStep
<
Scalar
,
Options
,
JointCollectionTpl
>
>
:
fusion
::
JointUnaryVisitorBase
<
EmptyForwardStep
UnaryVisit
<
Scalar
,
Options
,
JointCollectionTpl
>
>
{
{
typedef
ModelTpl
<
Scalar
,
Options
,
JointCollectionTpl
>
Model
;
typedef
ModelTpl
<
Scalar
,
Options
,
JointCollectionTpl
>
Model
;
typedef
DataTpl
<
Scalar
,
Options
,
JointCollectionTpl
>
Data
;
typedef
DataTpl
<
Scalar
,
Options
,
JointCollectionTpl
>
Data
;
...
@@ -47,19 +47,17 @@ namespace pinocchio
...
@@ -47,19 +47,17 @@ namespace pinocchio
};
};
template
<
typename
Scalar
,
int
Options
,
template
<
typename
,
int
>
class
JointCollectionTpl
>
template
<
typename
Scalar
,
int
Options
,
template
<
typename
,
int
>
class
JointCollectionTpl
>
inline
void
emptyForwardPass
(
const
ModelTpl
<
Scalar
,
Options
,
JointCollectionTpl
>
&
model
,
inline
void
emptyForwardPass
UnaryVisit
(
const
ModelTpl
<
Scalar
,
Options
,
JointCollectionTpl
>
&
model
,
DataTpl
<
Scalar
,
Options
,
JointCollectionTpl
>
&
data
)
DataTpl
<
Scalar
,
Options
,
JointCollectionTpl
>
&
data
)
{
{
assert
(
model
.
check
(
data
)
&&
"data is not consistent with model."
);
assert
(
model
.
check
(
data
)
&&
"data is not consistent with model."
);
typedef
typename
ModelTpl
<
Scalar
,
Options
,
JointCollectionTpl
>::
JointIndex
JointIndex
;
typedef
typename
ModelTpl
<
Scalar
,
Options
,
JointCollectionTpl
>::
JointIndex
JointIndex
;
typedef
EmptyForwardStep
<
Scalar
,
Options
,
JointCollectionTpl
>
Algo
;
typedef
EmptyForwardStep
UnaryVisit
<
Scalar
,
Options
,
JointCollectionTpl
>
Algo
;
for
(
JointIndex
i
=
1
;
i
<
(
JointIndex
)
model
.
njoints
;
++
i
)
for
(
JointIndex
i
=
1
;
i
<
(
JointIndex
)
model
.
njoints
;
++
i
)
{
{
Algo
::
run
(
model
.
joints
[
i
],
Algo
::
run
(
model
.
joints
[
i
],
data
.
joints
[
i
]);
data
.
joints
[
i
]
);
}
}
}
}
}
}
...
@@ -250,7 +248,7 @@ int main(int argc, const char ** argv)
...
@@ -250,7 +248,7 @@ int main(int argc, const char ** argv)
timer
.
tic
();
timer
.
tic
();
SMOOTH
(
NBT
)
SMOOTH
(
NBT
)
{
{
emptyForwardPass
(
model
,
data
);
emptyForwardPass
UnaryVisit
(
model
,
data
);
}
}
std
::
cout
<<
"Empty Forward Pass =
\t
"
;
timer
.
toc
(
std
::
cout
,
NBT
);
std
::
cout
<<
"Empty Forward Pass =
\t
"
;
timer
.
toc
(
std
::
cout
,
NBT
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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