FreeTensor
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
freetensor::Tensor Class Reference

#include <tensor.h>

Inheritance diagram for freetensor::Tensor:
Inheritance graph
[legend]
Collaboration diagram for freetensor::Tensor:
Collaboration graph
[legend]

Public Member Functions

auto & shape ()
 
const auto & shape () const
 
void setShape (SubTreeList< ExprNode > &&shape)
 
void setShape (const SubTreeList< ExprNode > &shape)
 
void setShape (const std::vector< Expr > &shape)
 
void setShape (std::initializer_list< Expr > shape)
 
DataType dtype () const
 
void setDType (const DataType &dtype)
 
bool isScalar () const
 
void compHash () override
 
- Public Member Functions inherited from freetensor::ASTPart
virtual ~ASTPart ()
 
 ASTPart (ASTPart &&other)
 
 ASTPart (const ASTPart &other)
 
ASTPartoperator= (ASTPart &&)
 
ASTPartoperator= (const ASTPart &)
 
bool trySetParent (const Ref< ASTPart > &parent)
 
void resetParent ()
 
Ref< ASTPartparent () const
 
bool isSubTree () const
 
int depth () const
 
virtual void modifiedHook ()
 
size_t hash ()
 
virtual bool isAST () const
 
- Public Member Functions inherited from freetensor::EnableSelf< ASTPart >
Ref< ASTPartself () const
 

Friends

template<class T >
Ref< TensormakeTensor (T &&, DataType)
 
Ref< TensormakeTensor (std::initializer_list< Expr >, DataType)
 

Additional Inherited Members

- Public Types inherited from freetensor::EnableSelf< ASTPart >
typedef ASTPart Self
 
- Protected Member Functions inherited from freetensor::ASTPart
void lock ()
 
void unlock ()
 
virtual void compHash ()=0
 
void resetHash ()
 
- Protected Attributes inherited from freetensor::ASTPart
size_t hash_ = ~0ull
 
std::atomic_flag lock_ = ATOMIC_FLAG_INIT
 

Member Function Documentation

◆ compHash()

void freetensor::Tensor::compHash ( )
overridevirtual

Implements freetensor::ASTPart.

◆ dtype()

DataType freetensor::Tensor::dtype ( ) const
inline

◆ isScalar()

bool freetensor::Tensor::isScalar ( ) const

◆ setDType()

void freetensor::Tensor::setDType ( const DataType dtype)
inline

◆ setShape() [1/4]

void freetensor::Tensor::setShape ( const std::vector< Expr > &  shape)
inline

◆ setShape() [2/4]

void freetensor::Tensor::setShape ( const SubTreeList< ExprNode > &  shape)
inline

◆ setShape() [3/4]

void freetensor::Tensor::setShape ( std::initializer_list< Expr shape)
inline

◆ setShape() [4/4]

void freetensor::Tensor::setShape ( SubTreeList< ExprNode > &&  shape)
inline

◆ shape() [1/2]

auto & freetensor::Tensor::shape ( )
inline

◆ shape() [2/2]

const auto & freetensor::Tensor::shape ( ) const
inline

Friends And Related Function Documentation

◆ makeTensor [1/2]

Ref< Tensor > makeTensor ( std::initializer_list< Expr shape,
DataType  dtype 
)
friend

◆ makeTensor [2/2]

template<class T >
Ref< Tensor > makeTensor ( T &&  shape,
DataType  dtype 
)
friend

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