Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenMesh
OpenMesh
Commits
fab8a9cf
Commit
fab8a9cf
authored
Nov 19, 2015
by
Hans-Christian Ebke
Browse files
Added another benchmark.
parent
6a43753f
Pipeline
#57
passed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/Benchmark/VectorT.cpp
View file @
fab8a9cf
...
...
@@ -106,3 +106,21 @@ MYBENCHMARK_TEMPLATE (ASSEMBLE(BMPOSTFIX, Vec_norm), OpenMesh::Vec3d);
MYBENCHMARK_TEMPLATE
(
ASSEMBLE
(
BMPOSTFIX
,
Vec_norm
),
OpenMesh
::
Vec3f
);
MYBENCHMARK_TEMPLATE
(
ASSEMBLE
(
BMPOSTFIX
,
Vec_norm
),
OpenMesh
::
Vec4d
);
MYBENCHMARK_TEMPLATE
(
ASSEMBLE
(
BMPOSTFIX
,
Vec_norm
),
OpenMesh
::
Vec4f
);
template
<
class
Vec
>
static
void
ASSEMBLE
(
BMPOSTFIX
,
Vec_times_scalar
)(
benchmark
::
State
&
state
)
{
Vec
v1
(
0.0
);
while
(
state
.
KeepRunning
())
{
v1
+=
testVec
<
Vec
>
();
v1
*=
static_cast
<
decltype
(
v1
.
norm
())
>
(
1.0
)
/
v1
[
0
];
v1
*=
v1
[
1
];
}
// Otherwise GCC will optimize everything away.
static
double
dummy
;
dummy
=
v1
.
norm
();
}
MYBENCHMARK_TEMPLATE
(
ASSEMBLE
(
BMPOSTFIX
,
Vec_times_scalar
),
OpenMesh
::
Vec3d
);
MYBENCHMARK_TEMPLATE
(
ASSEMBLE
(
BMPOSTFIX
,
Vec_times_scalar
),
OpenMesh
::
Vec3f
);
MYBENCHMARK_TEMPLATE
(
ASSEMBLE
(
BMPOSTFIX
,
Vec_times_scalar
),
OpenMesh
::
Vec4d
);
MYBENCHMARK_TEMPLATE
(
ASSEMBLE
(
BMPOSTFIX
,
Vec_times_scalar
),
OpenMesh
::
Vec4f
);
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