diff options
author | Cedric Nugteren <web@cedricnugteren.nl> | 2018-11-07 19:45:07 +0100 |
---|---|---|
committer | Cedric Nugteren <web@cedricnugteren.nl> | 2018-11-07 19:45:07 +0100 |
commit | 6f67525ea693d0761c479b060c04ce93d408beb5 (patch) | |
tree | 8e76bcfa9bf9d067a3969c70023634c66a9657f4 /src | |
parent | 2d32a23293cdc5e0e34160e9ee4f15dc824592b3 (diff) |
Changed col2im to append to the existing im-buffer
Diffstat (limited to 'src')
-rw-r--r-- | src/kernels/levelx/col2im.opencl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/kernels/levelx/col2im.opencl b/src/kernels/levelx/col2im.opencl index 5cadeec6..a37db24f 100644 --- a/src/kernels/levelx/col2im.opencl +++ b/src/kernels/levelx/col2im.opencl @@ -80,9 +80,10 @@ void col2im(const int input_h, const int input_w, const int channels, } } - // Sets the resulting value + // Accumulates the resulting value with the existing im-buffer (+= val) const int input_index = w_index + input_w * (h_index + input_h * c_id); - im_buffer[input_index + im_offset] = val; + real im_buffer_value = im_buffer[input_index + im_offset]; + Add(im_buffer[input_index + im_offset], im_buffer_value, val); } } |