Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
composable_kernel
Commits
27859437
Commit
27859437
authored
Nov 19, 2022
by
Po-Yen, Chen
Browse files
Make friend function hidden
parent
27876602
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
profiler/src/profiler_operation_registry.hpp
profiler/src/profiler_operation_registry.hpp
+12
-12
No files found.
profiler/src/profiler_operation_registry.hpp
View file @
27859437
...
@@ -30,6 +30,18 @@ class ProfilerOperationRegistry final
...
@@ -30,6 +30,18 @@ class ProfilerOperationRegistry final
std
::
map
<
std
::
string_view
,
Entry
>
entries_
;
std
::
map
<
std
::
string_view
,
Entry
>
entries_
;
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
stream
,
const
ProfilerOperationRegistry
&
registry
)
{
stream
<<
"{
\n
"
;
for
(
auto
&
[
name
,
entry
]
:
registry
.
entries_
)
{
stream
<<
"
\t
"
<<
name
<<
": "
<<
entry
.
description_
<<
"
\n
"
;
}
stream
<<
"}"
;
return
stream
;
}
public:
public:
static
ProfilerOperationRegistry
&
GetInstance
()
static
ProfilerOperationRegistry
&
GetInstance
()
{
{
...
@@ -56,18 +68,6 @@ class ProfilerOperationRegistry final
...
@@ -56,18 +68,6 @@ class ProfilerOperationRegistry final
std
::
forward_as_tuple
(
description
,
std
::
move
(
operation
)))
std
::
forward_as_tuple
(
description
,
std
::
move
(
operation
)))
.
second
;
.
second
;
}
}
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
stream
,
const
ProfilerOperationRegistry
&
registry
)
{
stream
<<
"{
\n
"
;
for
(
auto
&
[
name
,
entry
]
:
registry
.
entries_
)
{
stream
<<
"
\t
"
<<
name
<<
": "
<<
entry
.
description_
<<
"
\n
"
;
}
stream
<<
"}"
;
return
stream
;
}
};
};
#define PP_CONCAT(x, y) PP_CONCAT_IMPL(x, y)
#define PP_CONCAT(x, y) PP_CONCAT_IMPL(x, y)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment