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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
code
pugs
Commits
ad7bff9b
Commit
ad7bff9b
authored
6 years ago
by
Stéphane Del Pino
Browse files
Options
Downloads
Patches
Plain Diff
Add simple embedding for initialize and finalize functions
parent
f9b85404
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!8
Feature/kokkos encapsulate
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/main.cpp
+10
-37
10 additions, 37 deletions
src/main.cpp
src/utils/CMakeLists.txt
+2
-1
2 additions, 1 deletion
src/utils/CMakeLists.txt
src/utils/PastisUtils.cpp
+12
-0
12 additions, 0 deletions
src/utils/PastisUtils.cpp
src/utils/PastisUtils.hpp
+4
-0
4 additions, 0 deletions
src/utils/PastisUtils.hpp
with
28 additions
and
38 deletions
src/main.cpp
+
10
−
37
View file @
ad7bff9b
...
...
@@ -87,38 +87,11 @@ int main(int argc, char *argv[])
std
::
cout
<<
")
\n
"
;
std
::
cout
<<
"-------------------------------------------------------
\n
"
;
Kokkos
::
initialize
(
argc
,
argv
);
initialize
(
argc
,
argv
);
Kokkos
::
DefaultExecutionSpace
::
print_configuration
(
std
::
cout
);
std
::
map
<
std
::
string
,
double
>
method_cost_map
;
// { // Basic function based acoustic solver
// Kokkos::Timer timer;
// timer.reset();
// RawKokkos::AcousticSolver(number);
// method_cost_map["RawKokkos"] = timer.seconds();
// }
// { // class for acoustic solver (mesh less)
// Kokkos::Timer timer;
// timer.reset();
// MeshLessAcousticSolver acoustic_solver(number);
// method_cost_map["MeshLessAcousticSolver"] = timer.seconds();
// }
// { // class for acoustic solver
// Kokkos::Timer timer;
// timer.reset();
// AcousticSolverClass acoustic_solver(number);
// method_cost_map["AcousticSolverClass"] = timer.seconds();
// }
// { // class for acoustic solver test
// Kokkos::Timer timer;
// timer.reset();
// AcousticSolverTest acoustic_solver(number);
// method_cost_map["AcousticSolverTest"] = timer.seconds();
// }
try
{
if
(
filename
!=
""
)
{
std
::
cout
<<
"Reading (gmsh) "
<<
rang
::
style
::
underline
<<
filename
<<
rang
::
style
::
reset
<<
" ...
\n
"
;
...
...
@@ -444,7 +417,7 @@ int main(int argc, char *argv[])
std
::
exit
(
1
);
}
Kokkos
::
finalize
();
finalize
();
std
::
string
::
size_type
size
=
0
;
for
(
const
auto
&
method_cost
:
method_cost_map
)
{
...
...
This diff is collapsed.
Click to expand it.
src/utils/CMakeLists.txt
+
2
−
1
View file @
ad7bff9b
...
...
@@ -8,6 +8,7 @@ add_library(
BacktraceManager.cpp
ConsoleManager.cpp
FPEManager.cpp
PastisUtils.cpp
RevisionInfo.cpp
SignalManager.cpp
)
...
...
This diff is collapsed.
Click to expand it.
src/utils/PastisUtils.cpp
0 → 100644
+
12
−
0
View file @
ad7bff9b
#include
<PastisUtils.hpp>
#include
<Kokkos_Core.hpp>
void
initialize
(
int
&
argc
,
char
*
argv
[])
{
Kokkos
::
initialize
(
argc
,
argv
);
}
void
finalize
()
{
Kokkos
::
finalize
();
}
This diff is collapsed.
Click to expand it.
src/utils/PastisUtils.hpp
+
4
−
0
View file @
ad7bff9b
...
...
@@ -26,4 +26,8 @@ void parallel_reduce(const size_t& size,
Kokkos
::
parallel_reduce
(
label
,
size
,
array
,
value
);
}
void
initialize
(
int
&
argc
,
char
*
argv
[]);
void
finalize
();
#endif // PASTIS_UTILS_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