MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / get_bundle_nchw44

Function get_bundle_nchw44

dnn/src/arm_common/pooling/algo.cpp:47–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47WorkspaceBundle get_bundle_nchw44(const PoolingImpl::PoolingKernSizeParam& param) {
48 megdnn_assert(
49 (param.src_type.enumv() == DTypeEnum::QuantizedS8 ||
50 param.src_type.enumv() == DTypeEnum::Int8) &&
51 (param.format == param::Pooling::Format::NCHW44));
52 auto IH = param.isz[0];
53 auto IW = param.isz[1];
54 auto PH = param.padding[0];
55 auto PW = param.padding[1];
56 size_t padding_size = 0;
57 if ((PH != 0) || (PW != 0)) {
58 padding_size = (IW + 2 * PW) * (IH + 2 * PH) * 4 * sizeof(int8_t);
59 }
60 return WorkspaceBundle(nullptr, {padding_size});
61}
62
63const int8_t* handle_padding(
64 const int8_t* src, size_t IH, size_t IW, size_t& IH2, size_t& IW2, size_t PH,

Callers 1

Calls 2

WorkspaceBundleClass · 0.85
enumvMethod · 0.45

Tested by

no test coverage detected