26 #if defined(DATA_TYPE) && defined(AXIS) && defined(SRC_DIM2) && defined(DST_DIM3) 29 #define X_DST (idx_input) 34 #elif AXIS == 1 // AXIS == 1 36 #define Y_DST (idx_input) 40 #elif AXIS == 2 // AXIS == 2 43 #define Z_DST (idx_input) 46 #elif AXIS == 3 // AXIS == 3 50 #define W_DST (idx_input) 52 #elif AXIS == 4 // AXIS == 4 57 #define K_DST (idx_input) 58 #else // AXIS not supported 59 #error "Not supported axis" 94 unsigned int idx_input)
96 uint x_src = get_global_id(0);
97 uint y_src = get_global_id(1);
98 uint z_src = (get_global_id(2) % SRC_DIM2);
99 uint w_src = (get_global_id(2) / SRC_DIM2);
101 __global
DATA_TYPE *
src = (__global
DATA_TYPE *)(src_ptr + src_offset_first_element_in_bytes + x_src *
sizeof(
DATA_TYPE) + y_src * src_stride_y + z_src * src_stride_z + w_src * src_stride_w);
103 __global
DATA_TYPE *
dst = (__global
DATA_TYPE *)(dst_ptr + dst_offset_first_element_in_bytes + X_DST *
sizeof(
DATA_TYPE) + Y_DST * dst_stride_y + Z_DST * dst_stride_z + W_DST * dst_stride_w + K_DST *
104 dst_stride_w * (uint)DST_DIM3);
113 #endif // defined(DATA_TYPE) && defined(AXIS) && defined(SRC_DIM2) && defined(DST_DIM3)
SimpleTensor< float > src
SimpleTensor< T > stack_layer(const std::vector< SimpleTensor< T >> &in, const TensorShape &output_shape, DataType data_type, unsigned int axis)
#define TENSOR4D_DECLARATION(name)