1#ifndef FREE_TENSOR_BUFFER_H
2#define FREE_TENSOR_BUFFER_H
19 const auto &
tensor()
const {
return tensor_; }
34 b->tensor_ = std::forward<T>(tensor);
41 return makeBuffer(b->tensor(), b->atype(), b->mtype());
Definition: sub_tree.h:50
auto & tensor()
Definition: buffer.h:20
void compHash() override
Definition: buffer.cc:6
MemType mtype() const
Definition: buffer.h:26
void setMtype(MemType mtype)
Definition: buffer.h:25
friend Ref< Buffer > makeBuffer(T &&, AccessType, MemType)
Definition: buffer.h:32
const auto & tensor() const
Definition: buffer.h:19
AccessType atype() const
Definition: buffer.h:23
void setAtype(AccessType atype)
Definition: buffer.h:22
static Ref make()
Definition: ref.h:105
Definition: sub_tree.h:134
Definition: allocator.h:9
Ref< Buffer > makeBuffer(T &&tensor, AccessType atype, MemType mtype)
Definition: buffer.h:32
Expr deepCopy(const Expr &op)
Definition: ast.cc:364
AccessType
Definition: access_type.h:42
MemType
Definition: mem_type.h:14
Definition: sub_tree.h:20