27 #if defined(IS_DATA_TYPE_FLOAT) 28 #define CONVERT_RTE(x, type) (convert_##type##_rte((x))) 29 #define CONVERT_DOWN(x, type) CONVERT_RTE(x, type) 31 #define CONVERT_DOWN(x, type) CONVERT_SAT(x, type) 34 #define CONVERT_DOWN(x, type) CONVERT(x, type) 37 #define CONVERT_UP(x, type) CONVERT(x, type) 73 __global uchar *in_addr = in_ptr + in_offset_first_element_in_bytes +
sizeof(DATA_TYPE_IN) * x_offs + get_global_id(1) * in_stride_y + get_global_id(2) * in_stride_z;
74 __global uchar *out_addr = out_ptr + out_offset_first_element_in_bytes +
sizeof(
DATA_TYPE_OUT) * x_offs + get_global_id(1) * out_stride_y + get_global_id(2) * out_stride_z;
78 in_data =
VLOAD(VEC_SIZE)(0, (__global DATA_TYPE_IN *)in_addr);
80 #if defined(IS_DATA_TYPE_QUANTIZED) 82 #endif // defined(IS_DATA_TYPE_QUANTIZED) 84 #if defined(IS_DATA_TYPE_FLOAT) 127 __global uchar *in_addr = in_ptr + in_offset_first_element_in_bytes +
sizeof(DATA_TYPE_IN) * x_offs + get_global_id(1) * in_stride_y + get_global_id(2) * in_stride_z;
128 __global uchar *out_addr = out_ptr + out_offset_first_element_in_bytes +
sizeof(
DATA_TYPE_OUT) * x_offs + get_global_id(1) * out_stride_y + get_global_id(2) * out_stride_z;
132 in_data =
VLOAD(VEC_SIZE)(0, (__global DATA_TYPE_IN *)in_addr);
134 #if defined(IS_DATA_TYPE_FLOAT) #define CONVERT_DOWN(x, type)
__kernel void convert_depth_up(__global uchar *in_ptr, uint in_stride_x, uint in_step_x, uint in_stride_y, uint in_step_y, uint in_stride_z, uint in_step_z, uint in_offset_first_element_in_bytes, __global uchar *out_ptr, uint out_stride_x, uint out_step_x, uint out_stride_y, uint out_step_y, uint out_stride_z, uint out_step_z, uint out_offset_first_element_in_bytes, const int shift)
This function performs a up-scaling depth conversion.
#define STORE_VECTOR_SELECT(basename, data_type, ptr, vec_size, leftover, cond)
Store a vector that can only be partial in x.
#define CONVERT_UP(x, type)
__kernel void convert_depth_down(__global uchar *in_ptr, uint in_stride_x, uint in_step_x, uint in_stride_y, uint in_step_y, uint in_stride_z, uint in_step_z, uint in_offset_first_element_in_bytes, __global uchar *out_ptr, uint out_stride_x, uint out_step_x, uint out_stride_y, uint out_step_y, uint out_stride_z, uint out_step_z, uint out_offset_first_element_in_bytes, const int shift)
This function performs a down-scaling depth conversion.
#define TENSOR3D_DECLARATION(name)
#define VEC_DATA_TYPE(type, size)