Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
ebcad896
Commit
ebcad896
authored
Feb 12, 2019
by
Haichen Shen
Committed by
eqy
Feb 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix typo (#2595)
thanks @icemelon9, this is merged
parent
7e6cba48
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
topi/include/topi/detail/ravel_unravel.h
+1
-1
topi/include/topi/transform.h
+2
-2
No files found.
topi/include/topi/detail/ravel_unravel.h
View file @
ebcad896
...
...
@@ -44,7 +44,7 @@ inline Expr RavelIndex(Array<Var> indices, Array<Expr> shape) {
*
* \return The coordinate corresponding to the 1D index
*/
inline
Array
<
Expr
>
UnavelIndex
(
Expr
idx
,
Array
<
Expr
>
shape
)
{
inline
Array
<
Expr
>
Un
r
avelIndex
(
Expr
idx
,
Array
<
Expr
>
shape
)
{
std
::
vector
<
Expr
>
indices
;
for
(
int
i
=
static_cast
<
int
>
(
shape
.
size
())
-
1
;
i
>=
0
;
--
i
)
{
...
...
topi/include/topi/transform.h
View file @
ebcad896
...
...
@@ -188,7 +188,7 @@ inline Tensor reshape(const Tensor& x,
auto
x_shape
=
x
->
shape
;
return
compute
(
newshape
,
[
&
](
const
Array
<
Var
>&
indices
)
{
return
x
(
UnavelIndex
(
RavelIndex
(
indices
,
newshape
),
x_shape
));
return
x
(
Un
r
avelIndex
(
RavelIndex
(
indices
,
newshape
),
x_shape
));
},
name
,
tag
);
}
...
...
@@ -566,7 +566,7 @@ inline Tensor take(const Tensor& a,
for
(
size_t
j
=
0
;
j
<
indices
->
shape
.
size
();
++
j
)
{
indices_position
.
push_back
(
out_index
[
j
]);
}
return
a
(
UnavelIndex
(
indices
(
indices_position
),
a_shape
));
return
a
(
Un
r
avelIndex
(
indices
(
indices_position
),
a_shape
));
},
name
,
tag
);
}
...
...
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