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
4f6d52c1
Commit
4f6d52c1
authored
Nov 16, 2022
by
Anthony Chang
Browse files
add transpose const counterpart
parent
3908c88b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
library/include/ck/library/utility/host_tensor.hpp
library/include/ck/library/utility/host_tensor.hpp
+6
-1
No files found.
library/include/ck/library/utility/host_tensor.hpp
View file @
4f6d52c1
...
...
@@ -433,7 +433,7 @@ struct Tensor
return
mData
[
mDesc
.
GetOffsetFromMultiIndex
(
idx
)];
}
Tensor
<
T
>
Transpose
(
std
::
vector
<
size_t
>
axes
=
{})
Tensor
<
T
>
Transpose
(
std
::
vector
<
size_t
>
axes
=
{})
const
{
if
(
axes
.
empty
())
{
...
...
@@ -456,6 +456,11 @@ struct Tensor
return
ret
;
}
Tensor
<
T
>
Transpose
(
std
::
vector
<
size_t
>
axes
=
{})
{
return
const_cast
<
Tensor
<
T
>
const
*>
(
this
)
->
Transpose
(
axes
);
}
typename
Data
::
iterator
begin
()
{
return
mData
.
begin
();
}
typename
Data
::
iterator
end
()
{
return
mData
.
end
();
}
...
...
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