IAP GITLAB
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
corsika
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
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue 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
Pranav Sampathkumar
corsika
Commits
261088f7
Commit
261088f7
authored
4 years ago
by
Dominik Baack
Committed by
Ralf Ulrich
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fixed naming convention
parent
99e37e48
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
Processes/DevTools/Analytics/ExecTime.h
+27
-27
27 additions, 27 deletions
Processes/DevTools/Analytics/ExecTime.h
with
27 additions
and
27 deletions
Processes/DevTools/Analytics/ExecTime.h
+
27
−
27
View file @
261088f7
...
@@ -24,50 +24,50 @@ namespace corsika::process {
...
@@ -24,50 +24,50 @@ namespace corsika::process {
template
<
typename
T
>
template
<
typename
T
>
class
ExecTime
:
private
T
{
class
ExecTime
:
private
T
{
private:
private:
std
::
chrono
::
high_resolution_clock
::
time_point
fS
tart
;
std
::
chrono
::
high_resolution_clock
::
time_point
s
tart
Time_
;
std
::
chrono
::
duration
<
double
,
std
::
micro
>
fElapsedSum
;
std
::
chrono
::
duration
<
double
,
std
::
micro
>
cumulatedTime_
;
double
fM
ean
;
double
m
ean
_
;
double
fM
ean2
;
double
m
ean2
_
;
double
fM
in
;
double
m
in
_
;
double
fM
ax
;
double
m
ax
_
;
long
long
fN
;
long
long
n_
;
protected:
protected:
public:
public:
ExecTime
()
{
ExecTime
()
{
fM
in
=
std
::
numeric_limits
<
long
long
>::
max
();
m
in
_
=
std
::
numeric_limits
<
long
long
>::
max
();
fM
ax
=
0
;
m
ax
_
=
0
;
fM
ean
=
0
;
m
ean
_
=
0
;
fM
ean2
=
0
;
m
ean2
_
=
0
;
fN
=
0
;
n_
=
0
;
}
}
void
start
()
{
fS
tart
=
std
::
chrono
::
high_resolution_clock
::
now
();
}
void
start
()
{
s
tart
Time_
=
std
::
chrono
::
high_resolution_clock
::
now
();
}
void
stop
()
{
void
stop
()
{
auto
end
=
std
::
chrono
::
high_resolution_clock
::
now
();
auto
end
=
std
::
chrono
::
high_resolution_clock
::
now
();
std
::
chrono
::
duration
<
double
,
std
::
micro
>
timeDiv
=
std
::
chrono
::
duration
<
double
,
std
::
micro
>
timeDiv
=
std
::
chrono
::
duration_cast
<
std
::
chrono
::
duration
<
double
,
std
::
micro
>
>
(
end
-
fS
tart
);
std
::
chrono
::
duration_cast
<
std
::
chrono
::
duration
<
double
,
std
::
micro
>
>
(
end
-
s
tart
Time_
);
fElapsedSum
+=
timeDiv
;
cumulatedTime_
+=
timeDiv
;
fN
=
fN
+
1
;
n_
=
n_
+
1
;
if
(
fM
ax
<
timeDiv
.
count
())
fM
ax
=
timeDiv
.
count
();
if
(
m
ax
_
<
timeDiv
.
count
())
m
ax
_
=
timeDiv
.
count
();
if
(
timeDiv
.
count
()
<
fM
in
)
fM
in
=
timeDiv
.
count
();
if
(
timeDiv
.
count
()
<
m
in
_
)
m
in
_
=
timeDiv
.
count
();
double
delta
=
timeDiv
.
count
()
-
fM
ean
;
double
delta
=
timeDiv
.
count
()
-
m
ean
_
;
fM
ean
+=
delta
/
static_cast
<
double
>
(
fN
);
m
ean
_
+=
delta
/
static_cast
<
double
>
(
n_
);
double
delta2
=
timeDiv
.
count
()
-
fM
ean
;
double
delta2
=
timeDiv
.
count
()
-
m
ean
_
;
fM
ean2
+=
delta
*
delta2
;
m
ean2
_
+=
delta
*
delta2
;
}
}
double
mean
()
const
{
return
fM
ean
;
}
double
mean
()
const
{
return
m
ean
_
;
}
double
min
()
const
{
return
fM
in
;
}
double
min
()
const
{
return
m
in
_
;
}
double
max
()
const
{
return
fM
ax
;
}
double
max
()
const
{
return
m
ax
_
;
}
double
var
()
const
{
return
fM
ean2
/
fN
;
}
double
var
()
const
{
return
m
ean2
_
/
n_
;
}
double
sumTime
()
const
{
return
fElapsedSum
.
count
();
}
double
sumTime
()
const
{
return
cumulatedTime_
.
count
();
}
template
<
typename
Particle
,
typename
VTNType
>
template
<
typename
Particle
,
typename
VTNType
>
EProcessReturn
DoBoundaryCrossing
(
Particle
&
p
,
VTNType
const
&
from
,
EProcessReturn
DoBoundaryCrossing
(
Particle
&
p
,
VTNType
const
&
from
,
...
...
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