MCPcopy Create free account
hub / github.com/OAID/Tengine / FreeTensor

Method FreeTensor

core/include/tensor.hpp:71–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69 }
70
71 void FreeTensor(void)
72 {
73 if(type_ == kConstTensor && ExistAttr("free_mem") && ExistAttr("mem_addr"))
74 {
75 void* mem = any_cast<void*>(GetAttr("mem_addr"));
76 std::free(mem);
77
78 RemoveAttr("free_mem");
79 RemoveAttr("mem_addr");
80 }
81 }
82
83 Tensor(const Tensor& o)
84 : BaseObject(o), producer(o.producer), consumer(o.consumer), quant_param_(o.quant_param_), type_(o.type_),

Callers 1

set_tensor_memFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected