26 #if defined(DATA_TYPE) // Compile time constants
49 __kernel
void crop_tensor(
58 const int in_x = get_global_id(0) * (in_step_x / in_stride_x);
60 #if defined(WIDTH_FLIPPED)
61 const int in_y = in_offset_y - get_global_id(1);
62 #else // defined(WIDTH_FLIPPED)
63 const int in_y = in_offset_y + get_global_id(1);
64 #endif // defined(WIDTH_FLIPPED)
66 #if defined(HEIGHT_FLIPPED)
67 const int in_z = in_offset_z - get_global_id(2);
68 #else // defined(HEIGHT_FLIPPED)
69 const int in_z = in_offset_z + get_global_id(2);
70 #endif // defined(HEIGHT_FLIPPED)
74 #if defined(LAST_ACCESSED_X)
77 const int shift = max((
int)(get_global_id(0) *
VEC_SIZE) - (
int)LAST_ACCESSED_X, 0);
80 #endif // defined(LAST_ACCESSED_X)
82 __global
const uchar *input_addr =
tensor3D_offset(&in, in_x, in_y, in_z);
91 #else // defined(VEC_SIZE)
93 #endif // defined(VEC_SIZE)
96 #endif // defined(DATA_TYPE) && defined(LAST_ACCESSED_X)