Commit 674ea92d authored by wsttiger's avatar wsttiger
Browse files

Formatting

parent 90665ffd
...@@ -174,14 +174,16 @@ struct cpu_im2col ...@@ -174,14 +174,16 @@ struct cpu_im2col
// compute linear index for output // compute linear index for output
std::size_t ldx = ioutput * col_width + joutput; std::size_t ldx = ioutput * col_width + joutput;
std::size_t p = 0; std::size_t p = 0;
dfor(channels, kernel_h, kernel_w)( dfor(channels,
[&](std::size_t c, std::size_t koffset, std::size_t loffset) { kernel_h,
int idx = iinput + koffset - kdiv2_h; kernel_w)([&](std::size_t c, std::size_t koffset, std::size_t loffset) {
int jdx = jinput + loffset - kdiv2_w; int idx = iinput + koffset - kdiv2_h;
col(ldx, p) = ((idx >= 0) && (idx < height) && (jdx >= 0) && (jdx < width)) ? int jdx = jinput + loffset - kdiv2_w;
input(0, c, idx, jdx) : 0; col(ldx, p) = ((idx >= 0) && (idx < height) && (jdx >= 0) && (jdx < width))
p++; ? input(0, c, idx, jdx)
}); : 0;
p++;
});
} }
} }
}); });
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment