| 62 | } |
| 63 | |
| 64 | bool GeometryComputer::Context::allocTensor(Tensor* tensor) { |
| 65 | auto res = mBackend->onAcquireBuffer(tensor, Backend::STATIC); |
| 66 | if (!res) { |
| 67 | return false; |
| 68 | } |
| 69 | TensorUtils::getDescribe(tensor)->usage = Tensor::InsideDescribe::CONSTANT; |
| 70 | TensorUtils::getDescribeOrigin(tensor)->setBackend(mBackend.get()); |
| 71 | return true; |
| 72 | } |
| 73 | |
| 74 | inline bool _hasZeroDim(const Tensor* t) { |
| 75 |
no test coverage detected