Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pugs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
code
pugs
Commits
b9e61699
Commit
b9e61699
authored
Sep 18, 2018
by
Stéphane Del Pino
Browse files
Options
Downloads
Patches
Plain Diff
Encapsulate Kokkos::Timer
parent
ad7bff9b
No related branches found
No related tags found
1 merge request
!8
Feature/kokkos encapsulate
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main.cpp
+7
-5
7 additions, 5 deletions
src/main.cpp
src/utils/Timer.hpp
+8
-0
8 additions, 0 deletions
src/utils/Timer.hpp
with
15 additions
and
5 deletions
src/main.cpp
+
7
−
5
View file @
b9e61699
#include
<iostream>
#include
<iostream>
#include
<
Kokkos_Core
.hpp>
#include
<
PastisUtils
.hpp>
#include
<RevisionInfo.hpp>
#include
<RevisionInfo.hpp>
#include
<rang.hpp>
#include
<rang.hpp>
#include
<FPEManager.hpp>
#include
<FPEManager.hpp>
...
@@ -14,6 +14,8 @@
...
@@ -14,6 +14,8 @@
#include
<VTKWriter.hpp>
#include
<VTKWriter.hpp>
#include
<Timer.hpp>
#include
<TinyVector.hpp>
#include
<TinyVector.hpp>
#include
<TinyMatrix.hpp>
#include
<TinyMatrix.hpp>
...
@@ -95,7 +97,7 @@ int main(int argc, char *argv[])
...
@@ -95,7 +97,7 @@ int main(int argc, char *argv[])
try
{
try
{
if
(
filename
!=
""
)
{
if
(
filename
!=
""
)
{
std
::
cout
<<
"Reading (gmsh) "
<<
rang
::
style
::
underline
<<
filename
<<
rang
::
style
::
reset
<<
" ...
\n
"
;
std
::
cout
<<
"Reading (gmsh) "
<<
rang
::
style
::
underline
<<
filename
<<
rang
::
style
::
reset
<<
" ...
\n
"
;
Kokkos
::
Timer
gmsh_timer
;
Timer
gmsh_timer
;
gmsh_timer
.
reset
();
gmsh_timer
.
reset
();
GmshReader
gmsh_reader
(
filename
);
GmshReader
gmsh_reader
(
filename
);
method_cost_map
[
"Mesh building"
]
=
gmsh_timer
.
seconds
();
method_cost_map
[
"Mesh building"
]
=
gmsh_timer
.
seconds
();
...
@@ -122,7 +124,7 @@ int main(int argc, char *argv[])
...
@@ -122,7 +124,7 @@ int main(int argc, char *argv[])
const
MeshType
&
mesh
=
dynamic_cast
<
const
MeshType
&>
(
*
gmsh_reader
.
mesh
());
const
MeshType
&
mesh
=
dynamic_cast
<
const
MeshType
&>
(
*
gmsh_reader
.
mesh
());
Kokkos
::
Timer
timer
;
Timer
timer
;
timer
.
reset
();
timer
.
reset
();
MeshDataType
mesh_data
(
mesh
);
MeshDataType
mesh_data
(
mesh
);
...
@@ -231,7 +233,7 @@ int main(int argc, char *argv[])
...
@@ -231,7 +233,7 @@ int main(int argc, char *argv[])
const
MeshType
&
mesh
=
dynamic_cast
<
const
MeshType
&>
(
*
gmsh_reader
.
mesh
());
const
MeshType
&
mesh
=
dynamic_cast
<
const
MeshType
&>
(
*
gmsh_reader
.
mesh
());
Kokkos
::
Timer
timer
;
Timer
timer
;
timer
.
reset
();
timer
.
reset
();
MeshDataType
mesh_data
(
mesh
);
MeshDataType
mesh_data
(
mesh
);
...
@@ -327,7 +329,7 @@ int main(int argc, char *argv[])
...
@@ -327,7 +329,7 @@ int main(int argc, char *argv[])
const
MeshType
&
mesh
=
dynamic_cast
<
const
MeshType
&>
(
*
gmsh_reader
.
mesh
());
const
MeshType
&
mesh
=
dynamic_cast
<
const
MeshType
&>
(
*
gmsh_reader
.
mesh
());
Kokkos
::
Timer
timer
;
Timer
timer
;
timer
.
reset
();
timer
.
reset
();
MeshDataType
mesh_data
(
mesh
);
MeshDataType
mesh_data
(
mesh
);
...
...
This diff is collapsed.
Click to expand it.
src/utils/Timer.hpp
0 → 100644
+
8
−
0
View file @
b9e61699
#ifndef TIMER_HPP
#define TIMER_HPP
#include
<Kokkos_Timer.hpp>
using
Timer
=
Kokkos
::
Timer
;
#endif // TIMER_HPP
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