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

Method makePool

source/geometry/GeometryComputerUtils.cpp:30–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28 return false;
29}
30flatbuffers::Offset<Op> GeometryComputerUtils::makePool(flatbuffers::FlatBufferBuilder& builder, std::pair<int, int> kernel, std::pair<int, int> stride, PoolType type, MNN::PoolPadType pad, std::pair<int, int> pads, bool isglobal, AvgPoolCountType countType) {
31 PoolBuilder poolB(builder);
32 poolB.add_type(type);
33 poolB.add_padType(pad);
34 poolB.add_padX(pads.first);
35 poolB.add_padY(pads.second);
36 poolB.add_kernelX(kernel.first);
37 poolB.add_kernelY(kernel.second);
38 poolB.add_strideX(stride.first);
39 poolB.add_strideY(stride.second);
40 poolB.add_isGlobal(isglobal);
41 if (AvgPoolCountType_DEFAULT != countType) {
42 poolB.add_countType(countType);
43 }
44 auto poolOffset = poolB.Finish();
45 OpBuilder opB(builder);
46 opB.add_type(OpType_Pooling);
47 opB.add_main(poolOffset.Union());
48 opB.add_main_type(OpParameter_Pool);
49 return opB.Finish();
50}
51
52int GeometryComputerUtils::buildConstantTensors(std::vector<Schedule::OpCacheInfo>& infos) {
53 // Check Middle Const

Callers

nothing calls this directly

Calls 14

add_countTypeMethod · 0.80
add_typeMethod · 0.45
add_padTypeMethod · 0.45
add_padXMethod · 0.45
add_padYMethod · 0.45
add_kernelXMethod · 0.45
add_kernelYMethod · 0.45
add_strideXMethod · 0.45
add_strideYMethod · 0.45
add_isGlobalMethod · 0.45
FinishMethod · 0.45
add_mainMethod · 0.45

Tested by

no test coverage detected