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
9e696586
Commit
9e696586
authored
May 23, 2023
by
Adam Osewski
Browse files
Add some utilities.
parent
ffc45db7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
library/include/ck/library/utility/host_tensor.hpp
library/include/ck/library/utility/host_tensor.hpp
+4
-1
No files found.
library/include/ck/library/utility/host_tensor.hpp
View file @
9e696586
...
...
@@ -33,9 +33,10 @@ std::ostream& LogRange(std::ostream& os, Range&& range, std::string delim)
}
template
<
typename
T
,
typename
Range
>
std
::
ostream
&
LogRangeAsType
(
std
::
ostream
&
os
,
Range
&&
range
,
std
::
string
delim
)
std
::
ostream
&
LogRangeAsType
(
std
::
ostream
&
os
,
Range
&&
range
,
std
::
string
delim
,
int
row_size
=
16
)
{
bool
first
=
true
;
int
col
=
0
;
for
(
auto
&&
v
:
range
)
{
if
(
first
)
...
...
@@ -43,6 +44,8 @@ std::ostream& LogRangeAsType(std::ostream& os, Range&& range, std::string delim)
else
os
<<
delim
;
os
<<
static_cast
<
T
>
(
v
);
if
((
++
col
%
row_size
)
==
0
)
os
<<
"
\n
"
;
}
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