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

Formatting

parent 90665ffd
...@@ -174,12 +174,14 @@ struct cpu_im2col ...@@ -174,12 +174,14 @@ 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,
kernel_w)([&](std::size_t c, std::size_t koffset, std::size_t loffset) {
int idx = iinput + koffset - kdiv2_h; int idx = iinput + koffset - kdiv2_h;
int jdx = jinput + loffset - kdiv2_w; int jdx = jinput + loffset - kdiv2_w;
col(ldx, p) = ((idx >= 0) && (idx < height) && (jdx >= 0) && (jdx < width)) ? col(ldx, p) = ((idx >= 0) && (idx < height) && (jdx >= 0) && (jdx < width))
input(0, c, idx, jdx) : 0; ? input(0, c, idx, jdx)
: 0;
p++; 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