Skip to content
Snippets Groups Projects
Commit b9e61699 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Encapsulate Kokkos::Timer

parent ad7bff9b
No related branches found
No related tags found
1 merge request!8Feature/kokkos encapsulate
#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);
......
#ifndef TIMER_HPP
#define TIMER_HPP
#include <Kokkos_Timer.hpp>
using Timer = Kokkos::Timer;
#endif // TIMER_HPP
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment