Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tnl-dev
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor 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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
TNL
tnl-dev
Commits
de8f034c
There was an error fetching the commit references. Please try again later.
Commit
de8f034c
authored
6 years ago
by
Tomáš Oberhuber
Committed by
Jakub Klinkovský
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Changing minTime in Benchmark from int to double.
parent
920d7c18
No related branches found
No related tags found
1 merge request
!20
Traversers optimizations
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Benchmarks/Benchmarks.h
+7
-6
7 additions, 6 deletions
src/Benchmarks/Benchmarks.h
src/Benchmarks/Traversers/GridTraversersBenchmark.h
+5
-7
5 additions, 7 deletions
src/Benchmarks/Traversers/GridTraversersBenchmark.h
with
12 additions
and
13 deletions
src/Benchmarks/Benchmarks.h
+
7
−
6
View file @
de8f034c
...
...
@@ -41,7 +41,7 @@ double
timeFunction
(
ComputeFunction
compute
,
ResetFunction
reset
,
int
loops
,
int
minTime
,
const
double
&
minTime
,
Monitor
&&
monitor
=
Monitor
()
)
{
// the timer is constructed zero-initialized and stopped
...
...
@@ -56,7 +56,7 @@ timeFunction( ComputeFunction compute,
int
i
;
for
(
i
=
0
;
i
<
loops
||
timer
.
getRealTime
()
<
(
double
)
minTime
;
i
<
loops
||
timer
.
getRealTime
()
<
minTime
;
++
i
)
{
// abuse the monitor's "time" for loops
...
...
@@ -330,13 +330,13 @@ public:
static
void
configSetup
(
Config
::
ConfigDescription
&
config
)
{
config
.
addEntry
<
int
>
(
"loops"
,
"Number of iterations for every computation."
,
10
);
config
.
addEntry
<
int
>
(
"min-time"
,
"Minimal real time in seconds for every computation."
,
1
);
config
.
addEntry
<
double
>
(
"min-time"
,
"Minimal real time in seconds for every computation."
,
1
);
}
void
setup
(
const
Config
::
ParameterContainer
&
parameters
)
{
this
->
loops
=
parameters
.
getParameter
<
unsigned
>
(
"loops"
);
this
->
minTime
=
parameters
.
getParameter
<
unsigned
>
(
"min-time"
);
this
->
minTime
=
parameters
.
getParameter
<
double
>
(
"min-time"
);
const
unsigned
verbose
=
parameters
.
getParameter
<
unsigned
>
(
"verbose"
);
Logging
::
setVerbose
(
verbose
);
}
...
...
@@ -348,7 +348,7 @@ public:
this
->
loops
=
loops
;
}
void
setMinTime
(
int
minTime
)
void
setMinTime
(
const
double
&
minTime
)
{
this
->
minTime
=
minTime
;
}
...
...
@@ -507,7 +507,8 @@ public:
}
protected
:
int
loops
,
minTime
=
1
;
int
loops
=
1
;
double
minTime
=
1
;
double
datasetSize
=
0.0
;
double
baseTime
=
0.0
;
Solvers
::
IterativeSolverMonitor
<
double
,
int
>
monitor
;
...
...
This diff is collapsed.
Click to expand it.
src/Benchmarks/Traversers/GridTraversersBenchmark.h
+
5
−
7
View file @
de8f034c
...
...
@@ -65,23 +65,21 @@ class GridTraversersBenchmark< 1, Device, Real, Index >
{
class
EntitiesProcessor
{
};
class
UserData
{
};
Traverser
traverser
;
/*traverser.template processAllEntities< UserData, EntitiesProcessor >
( meshPointer,
userData );*/
}
protected
:
Index
size
;
Vector
v
;
Grid
grid
;
...
...
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