MCPcopy Create free account
hub / github.com/alibaba/MNN / ~Tensor

Method ~Tensor

source/core/Tensor.cpp:131–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131Tensor::~Tensor() {
132 // MNN_PRINT("free tensor:%p\n", this);
133 auto nativeDescribe = mDescribe->mContent.get();
134 if (nativeDescribe->memoryType == InsideDescribe::MEMORY_HOST) {
135 if (nullptr != mBuffer.host) {
136 MNNMemoryFreeAlign(mBuffer.host);
137 }
138 }
139 delete mDescribe;
140}
141
142Tensor* Tensor::createDevice(const std::vector<int>& dims, halide_type_t type, DimensionType dimType) {
143 auto shapeTensor = new Tensor((int)dims.size(), dimType);

Callers

nothing calls this directly

Calls 2

MNNMemoryFreeAlignFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected