49 vc = vload8(0, (__global DATA_TYPE *)src.
ptr);
51 if(all(vc == (DATA_TYPE)0))
53 vstore8(0, 0, (__global DATA_TYPE *)dst.
ptr);
59 nc = vload16(0, (__global DATA_TYPE *)
offset(&src, -1, -1));
61 out =
select((DATA_TYPE)0, vc, (vc >= nc.s01234567) && (vc >= nc.s12345678) && (vc >= nc.s23456789));
63 nc = vload16(0, (__global DATA_TYPE *)
offset(&src, -1, 0));
64 out =
select((DATA_TYPE)0, out, (vc >= nc.s01234567) && (vc > nc.s23456789));
66 nc = vload16(0, (__global DATA_TYPE *)
offset(&src, -1, +1));
67 out =
select((DATA_TYPE)0, out, (vc > nc.s01234567) && (vc > nc.s12345678) && (vc > nc.s23456789));
69 vstore8(out, 0, (__global DATA_TYPE *)dst.
ptr);
__global uchar * offset(const Image *img, int x, int y)
Get the pointer position of a Image.
#define CONVERT_TO_IMAGE_STRUCT(name)
#define IMAGE_DECLARATION(name)
SimpleTensor< float > src
Structure to hold Image information.
__global uchar * ptr
Pointer to the starting postion of the buffer.
SimpleTensor< T > select(const SimpleTensor< uint8_t > &c, const SimpleTensor< T > &x, const SimpleTensor< T > &y)
__kernel void non_max_suppression(__global uchar *src_ptr, uint src_stride_x, uint src_step_x, uint src_stride_y, uint src_step_y, 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_offset_first_element_in_bytes)
This function performs Non maxima suppression over a 3x3 window on a given image. ...
#define VEC_DATA_TYPE(type, size)