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

Function rep

dnn/src/fallback/mask_conv/opr_impl.cpp:19–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17 MEGDNN_MARK_USED_VAR(OW);
18 size_t i = 0;
19 rep(ic, IC) {
20 rep(fh, FH) {
21 rep(fw, FW) {
22 rep(ind, maskN) {
23 size_t oh = maskInd[ind] >> 16;
24 size_t ow = maskInd[ind] & 0xFFFF;
25 size_t fh2, fw2;
26 if (is_xcorr) {
27 fh2 = fh;
28 fw2 = fw;
29 } else {
30 fh2 = FH - fh - 1;
31 fw2 = FW - fw - 1;
32 }
33 dst[i++] =
34 src[ic * IH * IW + (oh * SH + fh2 * DH) * IW +
35 (ow * SW + fw2 * DW)];
36 }
37 }
38 }
39 }
40}
41
42template <typename ctype>

Callers 2

get_mask_indexFunction · 0.70
index_to_dstFunction · 0.70

Calls 4

TensorLayoutClass · 0.85
index_to_dstFunction · 0.85
getMethod · 0.45
execMethod · 0.45

Tested by

no test coverage detected