1#ifndef FREE_TENSOR_TENSOR_H
2#define FREE_TENSOR_TENSOR_H
21 auto &
shape() {
return shape_; }
22 const auto &
shape()
const {
return shape_; }
38 t->shape_ = std::forward<T>(shape);
Definition: sub_tree.h:50
Definition: data_type.h:106
static Ref make()
Definition: ref.h:105
Definition: sub_tree.h:305
void setShape(std::initializer_list< Expr > shape)
Definition: tensor.h:26
void compHash() override
Definition: tensor.cc:17
void setShape(const std::vector< Expr > &shape)
Definition: tensor.h:25
auto & shape()
Definition: tensor.h:21
friend Ref< Tensor > makeTensor(T &&, DataType)
Definition: tensor.h:36
DataType dtype() const
Definition: tensor.h:28
void setShape(const SubTreeList< ExprNode > &shape)
Definition: tensor.h:24
const auto & shape() const
Definition: tensor.h:22
bool isScalar() const
Definition: tensor.cc:6
void setDType(const DataType &dtype)
Definition: tensor.h:29
void setShape(SubTreeList< ExprNode > &&shape)
Definition: tensor.h:23
Definition: allocator.h:9
Expr deepCopy(const Expr &op)
Definition: ast.cc:364
Ref< Tensor > makeTensor(T &&shape, DataType dtype)
Definition: tensor.h:36
Definition: sub_tree.h:20