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
9e696586
"test/git@developer.sourcefind.cn:hehl2/torchaudio.git" did not exist on "b457cb711a9a849b1226ede93ae247cd1e06eddf"
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)
...
@@ -33,9 +33,10 @@ std::ostream& LogRange(std::ostream& os, Range&& range, std::string delim)
}
}
template
<
typename
T
,
typename
Range
>
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
;
bool
first
=
true
;
int
col
=
0
;
for
(
auto
&&
v
:
range
)
for
(
auto
&&
v
:
range
)
{
{
if
(
first
)
if
(
first
)
...
@@ -43,6 +44,8 @@ std::ostream& LogRangeAsType(std::ostream& os, Range&& range, std::string delim)
...
@@ -43,6 +44,8 @@ std::ostream& LogRangeAsType(std::ostream& os, Range&& range, std::string delim)
else
else
os
<<
delim
;
os
<<
delim
;
os
<<
static_cast
<
T
>
(
v
);
os
<<
static_cast
<
T
>
(
v
);
if
((
++
col
%
row_size
)
==
0
)
os
<<
"
\n
"
;
}
}
return
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