tvm
Public Member Functions | List of all members
tvm::te::Tensor::Slice Class Reference

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...

#include <tensor.h>

Collaboration diagram for tvm::te::Tensor::Slice:

Public Member Functions

 Slice (const Tensor &tensor, std::vector< PrimExpr > indices)
 
Slice operator[] (PrimExpr i)
 get i-th slice from the current slice. More...
 
 operator PrimExpr () const
 Convert slice to expression. This is only valid when all the coordinates are fully specified. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Slice()

tvm::te::Tensor::Slice::Slice ( const Tensor tensor,
std::vector< PrimExpr indices 
)
inline

Member Function Documentation

◆ operator PrimExpr()

tvm::te::Tensor::Slice::operator PrimExpr ( ) const
inline

Convert slice to expression. This is only valid when all the coordinates are fully specified.

Returns
the corresponding expression of this slice.

◆ operator[]()

Slice tvm::te::Tensor::Slice::operator[] ( PrimExpr  i)
inline

get i-th slice from the current slice.

Parameters
ithe index of the coordinate
Returns
the subsequent slice.

The documentation for this class was generated from the following file: