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

Function isFirstWrite

source/geometry/GeometryTensorArray.cpp:40–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40static bool isFirstWrite(const Tensor::InsideDescribe::NativeInsideDescribe* des) {
41 if (des->tensorArrayAttr->elemShape.empty()) {
42 return true;
43 }
44 for (const auto& dim : des->tensorArrayAttr->elemShape[0]) {
45 if (dim < 0) {
46 return true;
47 }
48 }
49 return false;
50}
51
52class GeometryTensorArray : public GeometryComputer {
53public:

Callers 2

onComputeMethod · 0.85
onComputeMethod · 0.85

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected