| 440 | } |
| 441 | |
| 442 | void GeometryComputerUtils::makeRaster(const CommandBuffer& srcBuffer, CommandBuffer& dstBuffer, |
| 443 | GeometryComputer::Context& ctx) { |
| 444 | dstBuffer.extras = srcBuffer.extras; |
| 445 | for (int index = 0; index < srcBuffer.command.size(); ++index) { |
| 446 | auto& iter = *srcBuffer.command[index]; |
| 447 | const Op* op = iter.op; |
| 448 | auto& cmd = iter; |
| 449 | auto type = op->type(); |
| 450 | MNN_ASSERT(OpType_Raster != type); |
| 451 | for (int i = 0; i < iter.inputs.size(); ++i) { |
| 452 | if (!OpCommonUtils::opNeedContent(op, i)) { |
| 453 | continue; |
| 454 | } |
| 455 | ctx.getRasterCacheCreateRecursive(cmd.inputs[i], dstBuffer); |
| 456 | } |
| 457 | dstBuffer.command.emplace_back(srcBuffer.command[index]); |
| 458 | } |
| 459 | } |
| 460 | std::shared_ptr<Command> GeometryComputerUtils::makeBinary(int type, Tensor* input0, Tensor* input1, Tensor* output) { |
| 461 | flatbuffers::FlatBufferBuilder builder(DEFAULT_ALLOCATE_SIZE); |
| 462 | BinaryOpBuilder builder_(builder); |
nothing calls this directly
no test coverage detected