Fixed a modulo and division issue manifesting on Apple OpenCL for im2col

pull/192/head
Cedric Nugteren 2017-09-05 18:49:23 +02:00
parent 28462aa050
commit 8905da259d
1 changed files with 2 additions and 2 deletions

View File

@ -37,8 +37,8 @@ void im2col(const int input_h, const int input_w, const int channels,
// Thread IDs
const int w_id = get_global_id(0); // image width, max 'output_w'
const int h_id = get_global_id(1) % output_h; // image height, max 'output_h'
const int c_id = get_global_id(1) / output_h; // input channels
const int h_id = ((int)get_global_id(1)) % output_h; // image height, max 'output_h'
const int c_id = ((int)get_global_id(1)) / output_h; // input channels
if (h_id < output_h && w_id < output_w && c_id < channels) {
#pragma unroll