26 #if defined(DATA_TYPE) && defined(AXIS) 65 const int px = get_global_id(0);
66 const int py = get_global_id(1);
67 const int pz = get_global_id(2) % OUTPUT_DIM_Z;
68 const int pw = get_global_id(2) / OUTPUT_DIM_Z;
75 const uint index = *(__global
const uint *)
vector_offset(&indices, px);
76 __global
const uchar *input_addr =
tensor4D_offset(&input, index, py, pz, pw);
78 const uint index = *(__global
const uint *)
vector_offset(&indices, py);
79 __global
const uchar *input_addr =
tensor4D_offset(&input, px, index, pz, pw);
81 const uint index = *(__global
const uint *)
vector_offset(&indices, pz);
82 __global
const uchar *input_addr =
tensor4D_offset(&input, px, py, index, pw);
84 const uint index = *(__global
const uint *)
vector_offset(&indices, pw);
85 __global
const uchar *input_addr =
tensor4D_offset(&input, px, py, pz, index);
91 #endif //defined(DATA_TYPE) && defined(AXIS) Structure to hold Vector information.
__global uchar * ptr
Pointer to the starting postion of the buffer.
SimpleTensor< T > gather(const SimpleTensor< T > &src, const SimpleTensor< uint32_t > &indices, uint32_t actual_axis)
Structure to hold 4D tensor information.
#define CONVERT_TO_TENSOR4D_STRUCT_NO_STEP(name, mod_size)
#define VECTOR_DECLARATION(name)
__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_TENSOR4D_STRUCT(name, mod_size)
__global const uchar * vector_offset(const Vector *vec, int x)
Get the pointer position of a Vector.
#define TENSOR4D_DECLARATION(name)
#define CONVERT_TO_VECTOR_STRUCT_NO_STEP(name)