Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Timer
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
Package registry
Model registry
Operate
Environments
Terraform modules
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
数学の武士
Timer
Commits
cff042c0
Commit
cff042c0
authored
2 years ago
by
数学の武士
Browse files
Options
Downloads
Patches
Plain Diff
unordered_map
parent
a34210a3
No related branches found
No related tags found
No related merge requests found
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
Event.h
+1
-1
1 addition, 1 deletion
Event.h
Jikan.h
+1
-1
1 addition, 1 deletion
Jikan.h
JikanDepths.cpp
+16
-11
16 additions, 11 deletions
JikanDepths.cpp
JikanDepths.cu
+2
-1
2 additions, 1 deletion
JikanDepths.cu
JikanDepths.h
+3
-2
3 additions, 2 deletions
JikanDepths.h
with
23 additions
and
16 deletions
Event.h
+
1
−
1
View file @
cff042c0
...
...
@@ -2,7 +2,7 @@
#include
<string>
#include
<vector>
#include
<map>
//
#include <map>
#include
<chrono>
#include
"Jikan.h"
...
...
This diff is collapsed.
Click to expand it.
Jikan.h
+
1
−
1
View file @
cff042c0
...
...
@@ -2,7 +2,7 @@
//------------------------- Jikan-config ---------------------------------------------
#define TIMER_ON
//
#define INCLUDE_GPU_TIMER
#define INCLUDE_GPU_TIMER
#define INCLUDE_MPI
// #define INCLUDE_OPEN_MP
// #define SAVE_TIME_SERIES
...
...
This diff is collapsed.
Click to expand it.
JikanDepths.cpp
+
16
−
11
View file @
cff042c0
...
...
@@ -3,7 +3,7 @@
#include
"ToJSON.h"
#include
<iostream>
#include
<map>
//
#include <map>
#include
<string>
#ifdef INCLUDE_OPEN_MP
...
...
@@ -86,7 +86,7 @@ Jikan::~Jikan()
#endif
this
->
Events
.
clear
();
map
<
string
,
set
<
string
>
>::
iterator
it
;
unordered_
map
<
string
,
set
<
string
>
>::
iterator
it
;
for
(
it
=
this
->
EventType
.
begin
();
it
!=
this
->
EventType
.
end
();
++
it
)
it
->
second
.
clear
();
...
...
@@ -99,7 +99,7 @@ Jikan::~Jikan()
bool
Jikan
::
ifContains
(
const
string
&
Name
)
{
map
<
string
,
EventData
>::
iterator
it
;
unordered_
map
<
string
,
EventData
>::
iterator
it
;
it
=
this
->
Events
.
find
(
Name
);
if
(
it
==
this
->
Events
.
end
())
...
...
@@ -287,21 +287,26 @@ void Jikan::GenerateTypedOutputData(const string& EventType, string& EventTypeSt
void
Jikan
::
GenerateOutputData
()
{
map
<
string
,
set
<
string
>
>::
iterator
it
;
map
<
string
,
set
<
string
>
>::
iterator
end_m
=
this
->
EventType
.
end
();
--
end_m
;
unordered_
map
<
string
,
set
<
string
>
>::
iterator
it
;
unordered_
map
<
string
,
set
<
string
>
>::
iterator
end_m
;
//
= this->EventType.end();
//
end_m
--
;
string
Name
;
string
Out
=
"{ "
;
string
TypedOutput
;
for
(
it
=
this
->
EventType
.
begin
();
it
!=
end_m
;
++
it
)
for
(
it
=
this
->
EventType
.
begin
();
it
!=
this
->
EventType
.
end
();
++
it
)
{
if
(
next
(
it
)
!=
this
->
EventType
.
end
())
{
Name
=
it
->
first
;
TypedOutput
=
""
;
this
->
GenerateTypedOutputData
(
Name
,
TypedOutput
);
Out
+=
TypedOutput
+
",
\n
"
;
}
else
end_m
=
it
;
}
Name
=
end_m
->
first
;
TypedOutput
=
""
;
...
...
This diff is collapsed.
Click to expand it.
JikanDepths.cu
+
2
−
1
View file @
cff042c0
...
...
@@ -42,3 +42,4 @@ void Jikan::CUDAGetTime(const string& name, const int cont_mode_t)
}
#endif
}
#endif
\ No newline at end of file
This diff is collapsed.
Click to expand it.
JikanDepths.h
+
3
−
2
View file @
cff042c0
...
...
@@ -6,6 +6,7 @@
#include
<iostream>
#include
<string>
#include
<set>
#include
<unordered_map>
#ifdef INCLUDE_MPI
#include
<mpi.h>
...
...
@@ -14,8 +15,8 @@
class
Jikan
{
public:
std
::
map
<
std
::
string
,
EventData
>
Events
;
// Measuring code blocks info: string = code block name ID, EventData = measuring code block data
std
::
map
<
std
::
string
,
std
::
set
<
std
::
string
>
>
EventType
;
// Code blocks measurment types: synchronious or ansynchronious
std
::
unordered_
map
<
std
::
string
,
EventData
>
Events
;
// Measuring code blocks info: string = code block name ID, EventData = measuring code block data
std
::
unordered_
map
<
std
::
string
,
std
::
set
<
std
::
string
>
>
EventType
;
// Code blocks measurment types: synchronious or ansynchronious
std
::
string
JSONname
;
// Measurments dump filename
std
::
string
JSONdata
;
// Dump string
std
::
string
Error
;
// Dump error ?
...
...
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