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_ROCM
Commits
d452452d
Commit
d452452d
authored
Jun 20, 2023
by
Adam Osewski
Browse files
Add stream operator overload for Sequence data type.
parent
920a752b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
include/ck/host_utility/io.hpp
include/ck/host_utility/io.hpp
+12
-0
No files found.
include/ck/host_utility/io.hpp
View file @
d452452d
...
...
@@ -9,6 +9,8 @@
#include <iterator>
#include "ck/tensor_description/tensor_descriptor.hpp"
#include "ck/utility/sequence.hpp"
#include "ck/utility/functional2.hpp"
template
<
typename
T
>
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
std
::
vector
<
T
>&
v
)
...
...
@@ -39,3 +41,13 @@ std::ostream& operator<<(std::ostream& os, const ck::TensorDescriptor<Ts...>& de
return
os
;
}
template
<
ck
::
index_t
...
Is
>
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
ck
::
Sequence
<
Is
...
>&
seq
)
{
os
<<
"{"
;
ck
::
static_for
<
0
,
seq
.
Size
(),
1
>
{}([
&
](
auto
i
)
{
os
<<
seq
.
At
(
i
).
value
<<
", "
;
});
os
<<
"}"
;
return
os
;
}
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