| 81 | class GeometryTensorArraySize : public GeometryComputer { |
| 82 | public: |
| 83 | virtual bool onCompute(const Op* op, const std::vector<Tensor*>& inputs, const std::vector<Tensor*>& outputs, |
| 84 | Context& context, CommandBuffer& res) const override { |
| 85 | auto tensorArrayInput = inputs[1]; |
| 86 | if (TensorUtils::getDescribe(tensorArrayInput)->tensorArrayAttr == nullptr) { |
| 87 | MNN_ASSERT(false); |
| 88 | return false; |
| 89 | } |
| 90 | if (!context.allocTensor(outputs[0])) { |
| 91 | return false; |
| 92 | } |
| 93 | outputs[0]->host<int>()[0] = TensorUtils::getDescribe(tensorArrayInput)->tensorArrayAttr->arraySize; |
| 94 | return true; |
| 95 | } |
| 96 | }; |
| 97 | |
| 98 | class GeometryTensorArrayRead : public GeometryComputer { |
nothing calls this directly
no test coverage detected