26 #if defined(DATA_TYPE) && defined(BLOCK_SHAPE) && defined(CHANNEL_SIZE) 51 __kernel
void depth_to_space_nchw(
59 const int r = (CHANNEL_SIZE / (BLOCK_SHAPE * BLOCK_SHAPE));
60 const int x = get_global_id(0);
61 const int y = get_global_id(1);
62 const int z = get_global_id(2) % r;
64 const int out_x = x * BLOCK_SHAPE + (get_global_id(2) / r) % BLOCK_SHAPE;
65 const int out_y = y * BLOCK_SHAPE + (get_global_id(2) / r) / BLOCK_SHAPE;
93 __kernel
void depth_to_space_nhwc(
101 const int r = (CHANNEL_SIZE / (BLOCK_SHAPE * BLOCK_SHAPE));
102 const int x = get_global_id(1);
103 const int y = get_global_id(2);
104 const int z = get_global_id(0) % r;
106 const int out_x = x * BLOCK_SHAPE + (get_global_id(0) / r) % BLOCK_SHAPE;
107 const int out_y = y * BLOCK_SHAPE + (get_global_id(0) / r) / BLOCK_SHAPE;
111 #endif // defined(DATA_TYPE) && defined(BLOCK_SHAPE) && defined(CHANNEL_SIZE)
Structure to hold 3D tensor information.
Structure to hold 4D tensor information.
#define CONVERT_TO_TENSOR4D_STRUCT_NO_STEP(name, mod_size)
__global const uchar * tensor4D_offset(const Tensor4D *tensor, int x, int y, int z, int w)
Get the pointer position of a Tensor4D.
#define CONVERT_TO_TENSOR3D_STRUCT(name)
#define TENSOR4D_DECLARATION(name)
__global uchar * ptr
Pointer to the starting postion of the buffer.
#define TENSOR3D_DECLARATION(name)