Tensor structure representing a possible input, or intermediate computation result.
More...
#include <tensor.h>
|
class | Slice |
| data structure to represent a slice that fixes first k coordinates. This is used to enable syntax sugar of Tensor[x][y][z] to get the element. More...
|
|
Tensor structure representing a possible input, or intermediate computation result.
◆ Tensor()
◆ IndexWithNegativeIndices() [1/3]
template<typename... Args>
PrimExpr tvm::te::Tensor::IndexWithNegativeIndices |
( |
Args &&... |
args | ) |
const |
|
inline |
Take elements from the tensor with support for negative indices.
- Parameters
-
- Returns
- the result expression representing tensor read.
◆ IndexWithNegativeIndices() [2/3]
PrimExpr tvm::te::Tensor::IndexWithNegativeIndices |
( |
Array< PrimExpr > |
indices | ) |
const |
Take elements from the tensor with support for negative indices.
- Parameters
-
- Returns
- the result expression representing tensor read.
◆ IndexWithNegativeIndices() [3/3]
PrimExpr tvm::te::Tensor::IndexWithNegativeIndices |
( |
Array< Var > |
indices | ) |
const |
Take elements from the tensor with support for negative indices.
- Parameters
-
- Returns
- the result expression representing tensor read.
◆ ndim()
size_t tvm::te::Tensor::ndim |
( |
| ) |
const |
|
inline |
- Returns
- The dimension of the tensor
◆ operator!=()
bool tvm::te::Tensor::operator!= |
( |
const Tensor & |
other | ) |
const |
|
inline |
check if two tensors are different.
- Parameters
-
other | tensor to be checked. |
- Returns
- whether the two tensors are different.
◆ operator()() [1/3]
template<typename... Args>
PrimExpr tvm::te::Tensor::operator() |
( |
Args &&... |
args | ) |
const |
|
inline |
Take elements from the tensor.
- Parameters
-
- Returns
- the result expression representing tensor read.
◆ operator()() [2/3]
Take elements from the tensor.
- Parameters
-
- Returns
- the result expression representing tensor read.
◆ operator()() [3/3]
PrimExpr tvm::te::Tensor::operator() |
( |
Array< Var > |
indices | ) |
const |
Take elements from the tensor.
- Parameters
-
- Returns
- the result expression representing tensor read.
◆ operator==()
bool tvm::te::Tensor::operator== |
( |
const Tensor & |
other | ) |
const |
|
inline |
check if two tensors equals each other.
- Parameters
-
other | tensor to be checked. |
- Returns
- whether the two tensors equals each other.
◆ operator[]()
get i-th slice from the current Tensor.
- Parameters
-
i | the index of the coordinate |
- Returns
- the subsequent slice.
◆ TVM_DEFINE_OBJECT_REF_METHODS()
The documentation for this class was generated from the following file: