Skip to content

Commit

Permalink
to CamelCase
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewZhaoLuo committed Sep 21, 2021
1 parent d3bc48f commit d961c23
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/tvm/te/tensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class Tensor : public DataProducer {
* \param support_negative_indices Whether to normalize indices in the case of negative indices.
* \return the result expression representing tensor read.
*/
inline PrimExpr index_tensor(Array<PrimExpr> indices, bool support_negative_indices) const;
inline PrimExpr IndexTensor(Array<PrimExpr> indices, bool support_negative_indices) const;

public:
TVM_DLL Tensor(Array<PrimExpr> shape, DataType dtype, Operation op, int value_index);
Expand Down
6 changes: 3 additions & 3 deletions src/te/tensor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ IterVar reduce_axis(Range dom, std::string name) { return IterVar(dom, Var(name)
Var var(std::string name_hint, DataType t) { return Var(name_hint, t); }

// Tensor
inline PrimExpr Tensor::index_tensor(Array<PrimExpr> indices, bool support_negative_indices) const {
inline PrimExpr Tensor::IndexTensor(Array<PrimExpr> indices, bool support_negative_indices) const {
Array<PrimExpr> shape = (*this)->shape;

if (shape.size() != 0) {
Expand All @@ -63,15 +63,15 @@ PrimExpr Tensor::operator()(Array<Var> indices) const {
return operator()(arr);
}

PrimExpr Tensor::operator()(Array<PrimExpr> indices) const { return index_tensor(indices, false); }
PrimExpr Tensor::operator()(Array<PrimExpr> indices) const { return IndexTensor(indices, false); }

PrimExpr Tensor::IndexWithNegativeIndices(Array<Var> indices) const {
Array<PrimExpr> arr(indices.begin(), indices.end());
return IndexWithNegativeIndices(arr);
}

PrimExpr Tensor::IndexWithNegativeIndices(Array<PrimExpr> indices) const {
return index_tensor(indices, true);
return IndexTensor(indices, true);
}

String TensorNode::GetNameHint() const {
Expand Down

0 comments on commit d961c23

Please sign in to comment.