26 #if defined(DATA_TYPE) && defined(BATCH_SIZE)
59 __kernel
void batch_to_space_nchw(
69 const int block_x = *((__global
int *)
vector_offset(&block, 0));
70 const int block_y = *((__global
int *)
vector_offset(&block, 1));
72 const int x = get_global_id(0);
73 const int y = get_global_id(1);
74 const int z = get_global_id(2);
76 const int in_batch = batch_id + ((x % block_x) + (y % block_y) * block_x) * BATCH_SIZE;
77 const int in_x = x / block_x;
78 const int in_y = y / block_y;
80 *((__global DATA_TYPE *)out.
ptr) = *((__global DATA_TYPE *)
tensor4D_offset(&in, in_x, in_y, z, in_batch));
82 #endif // defined(DATA_TYPE) && defined(BATCH_SIZE)
84 #if defined(DATA_TYPE) && defined(BATCH_SIZE) && defined(BLOCK_SHAPE_X) && defined(BLOCK_SHAPE_Y)
110 __kernel
void batch_to_space_static_nchw(
118 const int block_x = BLOCK_SHAPE_X;
119 const int block_y = BLOCK_SHAPE_Y;
121 const int x = get_global_id(0) + CROP_LEFT;
122 const int y = get_global_id(1) + CROP_TOP;
123 const int z = get_global_id(2);
125 const int in_batch = batch_id + ((x % block_x) + (y % block_y) * block_x) * BATCH_SIZE;
126 const int in_x = x / block_x;
127 const int in_y = y / block_y;
129 *((__global DATA_TYPE *)out.
ptr) = *((__global DATA_TYPE *)
tensor4D_offset(&in, in_x, in_y, z, in_batch));
131 #endif // defined(DATA_TYPE) && defined(BATCH_SIZE) && defined(BLOCK_SHAPE_X) && defined(BLOCK_SHAPE_Y)