| 129 | } |
| 130 | |
| 131 | Tensor::~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 | |
| 142 | Tensor* Tensor::createDevice(const std::vector<int>& dims, halide_type_t type, DimensionType dimType) { |
| 143 | auto shapeTensor = new Tensor((int)dims.size(), dimType); |
nothing calls this directly
no test coverage detected