54 #if defined(DATA_TYPE) && defined(WIDTH) && defined(HEIGHT) && defined(NUM_ANCHORS) && defined(STRIDE) && defined(NUM_ROI_FIELDS)
55 __kernel
void generate_proposals_compute_all_anchors(
62 const unsigned int idx = get_global_id(0);
64 const unsigned int anchor_idx = idx % NUM_ANCHORS;
67 const unsigned int shift_idx = idx / NUM_ANCHORS;
70 const float shift_x = (float)(shift_idx % WIDTH) * STRIDE;
71 const float shift_y = (float)(shift_idx / WIDTH) * STRIDE;
74 shift = (
VEC_DATA_TYPE(DATA_TYPE, NUM_ROI_FIELDS))(shift_x, shift_y, shift_x, shift_y);
78 anchor = vload4(0, (__global DATA_TYPE *)
vector_offset(&anchors, anchor_idx * NUM_ROI_FIELDS));
82 shifted_anchor = anchor + shift;
84 vstore4(shifted_anchor, 0, (__global DATA_TYPE *)rois.
ptr);
86 #endif //defined(DATA_TYPE) && defined(WIDTH) && defined(HEIGHT) && defined(NUM_ANCHORS) && defined(STRIDE) && defined(NUM_ROI_FIELDS)