Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-istl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Core Modules
dune-istl
Commits
fffd462c
Commit
fffd462c
authored
6 years ago
by
Lukas Renelt
Browse files
Options
Downloads
Patches
Plain Diff
[SIMD][multirhstest] allow access to measured timestamps
parent
f31c8d93
No related branches found
No related tags found
1 merge request
!219
[multirhstest] allow access to measured timestamps in multirhstest
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/istl/test/multirhstest.hh
+16
-3
16 additions, 3 deletions
dune/istl/test/multirhstest.hh
with
16 additions
and
3 deletions
dune/istl/test/multirhstest.hh
+
16
−
3
View file @
fffd462c
...
...
@@ -68,12 +68,14 @@ template <typename V>
V
detectVectorType
(
Dune
::
LinearOperator
<
V
,
V
>
&
);
template
<
typename
Operator
,
typename
Solver
>
void
run_test
(
std
::
string
precName
,
std
::
string
solverName
,
Operator
&
op
,
Solver
&
solver
,
unsigned
int
N
,
unsigned
int
Runs
)
std
::
vector
<
double
>
run_test
(
std
::
string
precName
,
std
::
string
solverName
,
Operator
&
op
,
Solver
&
solver
,
unsigned
int
N
,
unsigned
int
Runs
)
{
using
Vector
=
decltype
(
detectVectorType
(
op
));
using
FT
=
typename
Vector
::
field_type
;
Dune
::
Timer
t
;
Dune
::
Timer
t
(
false
);
std
::
vector
<
double
>
timestamps
;
std
::
cout
<<
"Trying "
<<
solverName
<<
"("
<<
precName
<<
")"
<<
" with "
<<
Dune
::
className
<
FT
>
()
<<
std
::
endl
;
for
(
unsigned
int
run
=
0
;
run
<
Runs
;
run
++
)
{
...
...
@@ -86,9 +88,20 @@ void run_test (std::string precName, std::string solverName, Operator & op, Solv
// call the solver
Dune
::
InverseOperatorResult
r
;
t
.
start
();
solver
.
apply
(
x
,
b
,
r
);
t
.
stop
();
double
time
=
t
.
lastElapsed
();
timestamps
.
push_back
(
time
);
}
std
::
cout
<<
Runs
<<
" run(s) took "
<<
t
.
stop
()
<<
std
::
endl
;
double
measuredTime
=
0.0
;
for
(
auto
d
:
timestamps
)
measuredTime
+=
d
;
std
::
cout
<<
Runs
<<
" run(s) took "
<<
measuredTime
<<
std
::
endl
;
return
timestamps
;
}
template
<
typename
Operator
,
typename
Prec
>
...
...
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