56 #if defined(FILTER_WIDTH) && defined(FILTER_HEIGHT) && defined(SRC_WIDTH) && defined(SRC_HEIGHT) && defined(DATA_TYPE) 88 __kernel
void deconvolution_reshape(
97 #define FILTER_AREA ((FILTER_WIDTH) * (FILTER_HEIGHT)) 104 const int x_in = get_global_id(0);
105 const int y_in = get_global_id(1);
106 const int z_in = get_global_id(2);
108 #if defined(NUM_FILTERS) 109 const int bias_index = x_in / (FILTER_AREA);
110 const int z_out = bias_index + (NUM_FILTERS) * (z_in / (SRC_HEIGHT));
111 const int x_out = x_in % (FILTER_WIDTH) + y_in * (FILTER_WIDTH);
112 const int y_out = (FILTER_HEIGHT) * (z_in % (SRC_HEIGHT)) + ((x_in % (FILTER_AREA)) / (FILTER_WIDTH));
113 #else // defined(NUM_FILTERS) 114 const int x_out = x_in / (FILTER_AREA);
115 const int y_out = x_in % (FILTER_WIDTH) + y_in * (FILTER_WIDTH);
116 const int z_out = (FILTER_HEIGHT) * z_in + ((x_in % (FILTER_AREA)) / (FILTER_WIDTH));
117 const int bias_index = x_out;
118 #endif // defined(NUM_FILTERS) 120 #if defined(ADD_BIAS) 124 #else // defined(ADD_BIAS) 126 #endif // defined(ADD_BIAS) 130 #endif // defined(FILTER_WIDTH) && defined(FILTER_HEIGHT) && defined(SRC_WIDTH) && defined(SRC_HEIGHT) && defined(DATA_TYPE) Structure to hold Vector information.
Structure to hold 3D tensor information.
SimpleTensor< float > src
#define CONVERT_TO_TENSOR3D_STRUCT_NO_STEP(name)
#define VECTOR_DECLARATION(name)
__kernel void deconvolution_upsample(__global uchar *src_ptr, uint src_stride_x, uint src_step_x, uint src_stride_y, uint src_step_y, uint src_stride_z, uint src_step_z, uint src_offset_first_element_in_bytes, __global uchar *dst_ptr, uint dst_stride_x, uint dst_step_x, uint dst_stride_y, uint dst_step_y, uint dst_stride_z, uint dst_step_z, uint dst_offset_first_element_in_bytes)
This function applies upsample on an input image.
#define CONVERT_TO_TENSOR3D_STRUCT(name)
__global const uchar * vector_offset(const Vector *vec, int x)
Get the pointer position of a Vector.
__global uchar * ptr
Pointer to the starting postion of the buffer.
#define TENSOR3D_DECLARATION(name)
#define CONVERT_TO_VECTOR_STRUCT_NO_STEP(name)
__global const uchar * tensor3D_offset(const Tensor3D *tensor, int x, int y, int z)
Get the pointer position of a Tensor3D.