MCPcopy Create free account
hub / github.com/alibaba/MNN / onCompute

Method onCompute

source/geometry/GeometryShape.cpp:78–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76class GeometryRank : public GeometryComputer {
77public:
78 virtual bool onCompute(const Op* op, const std::vector<Tensor*>& inputs, const std::vector<Tensor*>& outputs,
79 Context& context, CommandBuffer& res) const override {
80 if (nullptr == TensorUtils::getDescribeOrigin(outputs[0])->mem.get()) {
81 if(!context.allocTensor(outputs[0])) {
82 return false;
83 }
84 }
85 outputs[0]->host<int>()[0] = inputs[0]->buffer().dimensions;
86 return true;
87 }
88};
89
90class GeometryPriorBox : public GeometryComputer {

Callers

nothing calls this directly

Calls 3

allocTensorMethod · 0.80
getMethod · 0.45
bufferMethod · 0.45

Tested by

no test coverage detected