From ebcad89645092361624aae45b5b81b9e3eb36bac Mon Sep 17 00:00:00 2001 From: Haichen Shen Date: Tue, 12 Feb 2019 22:54:12 -0800 Subject: [PATCH] Fix typo (#2595) thanks @icemelon9, this is merged --- topi/include/topi/detail/ravel_unravel.h | 2 +- topi/include/topi/transform.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/topi/include/topi/detail/ravel_unravel.h b/topi/include/topi/detail/ravel_unravel.h index b9774153e..d5a45270c 100644 --- a/topi/include/topi/detail/ravel_unravel.h +++ b/topi/include/topi/detail/ravel_unravel.h @@ -44,7 +44,7 @@ inline Expr RavelIndex(Array indices, Array shape) { * * \return The coordinate corresponding to the 1D index */ -inline Array UnavelIndex(Expr idx, Array shape) { +inline Array UnravelIndex(Expr idx, Array shape) { std::vector indices; for (int i = static_cast(shape.size()) - 1; i >= 0; --i) { diff --git a/topi/include/topi/transform.h b/topi/include/topi/transform.h index bae0a4893..04759a582 100644 --- a/topi/include/topi/transform.h +++ b/topi/include/topi/transform.h @@ -188,7 +188,7 @@ inline Tensor reshape(const Tensor& x, auto x_shape = x->shape; return compute( newshape, [&](const Array& indices) { - return x(UnavelIndex(RavelIndex(indices, newshape), x_shape)); + return x(UnravelIndex(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(UnravelIndex(indices(indices_position), a_shape)); }, name, tag); } -- 2.34.1