Compute Library
18.05
|
Go to the source code of this file.
Data Structures | |
struct | Vector |
Structure to hold Vector information. More... | |
struct | Image |
Structure to hold Image information. More... | |
struct | Tensor3D |
Structure to hold 3D tensor information. More... | |
struct | Tensor4D |
Structure to hold 4D tensor information. More... | |
Macros | |
#define | EXPAND(x) x |
#define | CLAMP(x, min_val, max_val) min(max(x, min_val), max_val) |
#define | VLOAD_STR(size) vload##size |
#define | VLOAD(size) VLOAD_STR(size) |
#define | VSTORE_STR(size) vstore##size |
#define | VSTORE(size) VSTORE_STR(size) |
#define | VEC_DATA_TYPE_STR(type, size) type##size |
#define | VEC_DATA_TYPE(type, size) VEC_DATA_TYPE_STR(type, size) |
#define | CL_VEC_DATA_TYPE_STR(type, size) type##size |
#define | CL_VEC_DATA_TYPE(type, size) CL_VEC_DATA_TYPE_STR(type, size) |
#define | CONVERT_STR(x, type) (convert_##type((x))) |
#define | CONVERT(x, type) CONVERT_STR(x, type) |
#define | CONVERT_SAT_STR(x, type) (convert_##type##_sat((x))) |
#define | CONVERT_SAT(x, type) CONVERT_SAT_STR(x, type) |
#define | CONVERT_SAT_ROUND_STR(x, type, round) (convert_##type##_sat_##round((x))) |
#define | CONVERT_SAT_ROUND(x, type, round) CONVERT_SAT_ROUND_STR(x, type, round) |
#define | VECTOR_DECLARATION(name) |
#define | IMAGE_DECLARATION(name) |
#define | TENSOR3D_DECLARATION(name) |
#define | TENSOR4D_DECLARATION(name) |
#define | CONVERT_TO_VECTOR_STRUCT(name) update_vector_workitem_ptr(name##_ptr, name##_offset_first_element_in_bytes, name##_stride_x, name##_step_x) |
#define | CONVERT_TO_VECTOR_STRUCT_NO_STEP(name) update_vector_workitem_ptr(name##_ptr, name##_offset_first_element_in_bytes, name##_stride_x, 0) |
#define | CONVERT_TO_IMAGE_STRUCT(name) update_image_workitem_ptr(name##_ptr, name##_offset_first_element_in_bytes, name##_stride_x, name##_step_x, name##_stride_y, name##_step_y) |
#define | CONVERT_TO_IMAGE_STRUCT_NO_STEP(name) update_image_workitem_ptr(name##_ptr, name##_offset_first_element_in_bytes, name##_stride_x, 0, name##_stride_y, 0) |
#define | CONVERT_TENSOR3D_TO_IMAGE_STRUCT(name) update_image_from_tensor3D_workitem_ptr(name##_ptr, name##_offset_first_element_in_bytes, name##_stride_x, name##_step_x, name##_stride_y, name##_step_y, name##_stride_z, name##_step_z) |
#define | CONVERT_TENSOR3D_TO_IMAGE_STRUCT_NO_STEP(name) update_image_from_tensor3D_workitem_ptr(name##_ptr, name##_offset_first_element_in_bytes, name##_stride_x, 0, name##_stride_y, 0, name##_stride_z, name##_step_z) |
#define | CONVERT_TENSOR3D_TO_IMAGE_STRUCT(name) update_image_from_tensor3D_workitem_ptr(name##_ptr, name##_offset_first_element_in_bytes, name##_stride_x, name##_step_x, name##_stride_y, name##_step_y, name##_stride_z, name##_step_z) |
#define | CONVERT_TO_TENSOR3D_STRUCT(name) |
#define | CONVERT_TO_TENSOR3D_STRUCT_NO_STEP(name) update_tensor3D_workitem_ptr(name##_ptr, name##_offset_first_element_in_bytes, name##_stride_x, 0, name##_stride_y, 0, name##_stride_z, 0) |
#define | CONVERT_TO_TENSOR4D_STRUCT(name, mod_size) |
#define | CONVERT_TO_TENSOR4D_STRUCT_NO_STEP(name, mod_size) update_tensor4D_workitem_ptr(name##_ptr, name##_offset_first_element_in_bytes, name##_stride_x, 0, name##_stride_y, 0, name##_stride_z, 0, name##_stride_w, 0, mod_size) |
Typedefs | |
typedef struct Vector | Vector |
Structure to hold Vector information. More... | |
typedef struct Image | Image |
Structure to hold Image information. More... | |
typedef struct Tensor3D | Tensor3D |
Structure to hold 3D tensor information. More... | |
typedef struct Tensor4D | Tensor4D |
Structure to hold 4D tensor information. More... | |
Functions | |
Vector | update_vector_workitem_ptr (__global uchar *ptr, uint offset_first_element_in_bytes, uint stride_x, uint step_x) |
Wrap vector information into an Vector structure, and make the pointer point at this workitem's data. More... | |
Image | update_image_workitem_ptr (__global uchar *ptr, uint offset_first_element_in_bytes, uint stride_x, uint step_x, uint stride_y, uint step_y) |
Wrap image information into an Image structure, and make the pointer point at this workitem's data. More... | |
Image | update_image_from_tensor3D_workitem_ptr (__global uchar *ptr, uint offset_first_element_in_bytes, uint stride_x, uint step_x, uint stride_y, uint step_y, uint stride_z, uint step_z) |
Wrap 3D tensor information into an image structure, and make the pointer point at this workitem's data. More... | |
Tensor3D | update_tensor3D_workitem_ptr (__global uchar *ptr, uint offset_first_element_in_bytes, uint stride_x, uint step_x, uint stride_y, uint step_y, uint stride_z, uint step_z) |
Wrap 3D tensor information into an tensor structure, and make the pointer point at this workitem's data. More... | |
Tensor4D | update_tensor4D_workitem_ptr (__global uchar *ptr, uint offset_first_element_in_bytes, uint stride_x, uint step_x, uint stride_y, uint step_y, uint stride_z, uint step_z, uint stride_w, uint step_w, uint mod_size) |
__global const uchar * | vector_offset (const Vector *vec, int x) |
Get the pointer position of a Vector. More... | |
__global uchar * | offset (const Image *img, int x, int y) |
Get the pointer position of a Image. More... | |
__global const uchar * | tensor3D_offset (const Tensor3D *tensor, int x, int y, int z) |
Get the pointer position of a Tensor3D. More... | |
__global const uchar * | tensor4D_offset (const Tensor4D *tensor, int x, int y, int z, int w) |
Get the pointer position of a Tensor4D. More... | |
#define CL_VEC_DATA_TYPE | ( | type, | |
size | |||
) | CL_VEC_DATA_TYPE_STR(type, size) |
Definition at line 51 of file helpers.h.
Referenced by softmax_layer_max_shift_exp_sum_serial().
#define CLAMP | ( | x, | |
min_val, | |||
max_val | |||
) | min(max(x, min_val), max_val) |
#define CONVERT | ( | x, | |
type | |||
) | CONVERT_STR(x, type) |
#define CONVERT_SAT | ( | x, | |
type | |||
) | CONVERT_SAT_STR(x, type) |
#define CONVERT_SAT_ROUND | ( | x, | |
type, | |||
round | |||
) | CONVERT_SAT_ROUND_STR(x, type, round) |
Definition at line 60 of file helpers.h.
Referenced by combine_gradients_L2().
#define CONVERT_SAT_ROUND_STR | ( | x, | |
type, | |||
round | |||
) | (convert_##type##_sat_##round((x))) |
#define CONVERT_SAT_STR | ( | x, | |
type | |||
) | (convert_##type##_sat((x))) |
#define CONVERT_TENSOR3D_TO_IMAGE_STRUCT | ( | name | ) | update_image_from_tensor3D_workitem_ptr(name##_ptr, name##_offset_first_element_in_bytes, name##_stride_x, name##_step_x, name##_stride_y, name##_step_y, name##_stride_z, name##_step_z) |
Definition at line 116 of file helpers.h.
Referenced by output_stage_quantized(), softmax_layer_max_shift_exp_sum_parallel(), softmax_layer_max_shift_exp_sum_serial(), and softmax_layer_norm().
#define CONVERT_TENSOR3D_TO_IMAGE_STRUCT | ( | name | ) | update_image_from_tensor3D_workitem_ptr(name##_ptr, name##_offset_first_element_in_bytes, name##_stride_x, name##_step_x, name##_stride_y, name##_step_y, name##_stride_z, name##_step_z) |
#define CONVERT_TENSOR3D_TO_IMAGE_STRUCT_NO_STEP | ( | name | ) | update_image_from_tensor3D_workitem_ptr(name##_ptr, name##_offset_first_element_in_bytes, name##_stride_x, 0, name##_stride_y, 0, name##_stride_z, name##_step_z) |
Definition at line 113 of file helpers.h.
Referenced by fill_image_borders_constant(), fill_image_borders_replicate(), and softmax_layer_norm().
#define CONVERT_TO_IMAGE_STRUCT | ( | name | ) | update_image_workitem_ptr(name##_ptr, name##_offset_first_element_in_bytes, name##_stride_x, name##_step_x, name##_stride_y, name##_step_y) |
Definition at line 104 of file helpers.h.
Referenced by absdiff(), accumulate(), accumulate_squared(), accumulate_weighted(), bitwise_and(), bitwise_not(), bitwise_or(), bitwise_xor(), channel_combine_NV(), channel_combine_RGB888(), channel_combine_RGBA8888(), channel_combine_UYVY422(), channel_combine_YUYV422(), channel_extract_NV12(), channel_extract_NV21(), channel_extract_RGB888(), channel_extract_RGBA8888(), channel_extract_UYVY422(), channel_extract_YUYV422(), combine_gradients_L1(), combine_gradients_L2(), convert_depth_down(), convert_depth_up(), convolution3x3_static(), convolution5x5_static(), convolution7x7_static(), convolution9x9_static(), convolution_rectangle(), convolution_separable1x5_static(), convolution_separable1x7_static(), convolution_separable1x9_static(), convolution_separable5x1_static(), convolution_separable7x1_static(), convolution_separable9x1_static(), copy_plane(), copy_planes_3p(), copy_to_keypoint(), deconvolution_upsample(), derivative(), dilate(), erode(), fast_corners(), gaussian1x5_sub_x(), gaussian5x1_sub_y(), harris_score_3x3(), harris_score_5x5(), harris_score_7x7(), hist_border_kernel(), hist_border_kernel_fixed(), hist_local_kernel(), hist_local_kernel_fixed(), integral_horizontal(), integral_vertical(), IYUV_to_NV12_bt709(), IYUV_to_RGB888_bt709(), IYUV_to_RGBA8888_bt709(), IYUV_to_YUV444_bt709(), magnitude_phase(), mean_stddev_accumulate(), minmax(), minmaxloc(), non_linear_filter_box3x3(), non_linear_filter_box5x5(), non_linear_filter_cross3x3(), non_linear_filter_cross5x5(), non_linear_filter_disk3x3(), non_linear_filter_disk5x5(), non_max_suppression(), NV12_to_IYUV_bt709(), NV12_to_RGB888_bt709(), NV12_to_RGBA8888_bt709(), NV12_to_YUV444_bt709(), NV21_to_IYUV_bt709(), NV21_to_RGB888_bt709(), NV21_to_RGBA8888_bt709(), NV21_to_YUV444_bt709(), reduction_operation(), remap_bilinear(), remap_nearest_neighbour(), RGB888_to_IYUV_bt709(), RGB888_to_NV12_bt709(), RGB888_to_RGBA8888_bt709(), RGB888_to_YUV444_bt709(), RGBA8888_to_IYUV_bt709(), RGBA8888_to_NV12_bt709(), RGBA8888_to_RGB888_bt709(), RGBA8888_to_YUV444_bt709(), scale_bilinear(), scale_nearest_neighbour(), scharr3x3(), sobel3x3(), sobel_separable1x5(), sobel_separable1x7(), sobel_separable5x1(), sobel_separable7x1(), suppress_non_maximum(), tablelookup_S16(), tablelookup_U8(), threshold_binary(), threshold_range(), transpose(), UYVY422_to_IYUV_bt709(), UYVY422_to_NV12_bt709(), UYVY422_to_RGB888_bt709(), UYVY422_to_RGBA8888_bt709(), warp_affine_bilinear(), warp_affine_nearest_neighbour(), warp_perspective_bilinear(), warp_perspective_nearest_neighbour(), YUYV422_to_IYUV_bt709(), YUYV422_to_NV12_bt709(), YUYV422_to_RGB888_bt709(), and YUYV422_to_RGBA8888_bt709().
#define CONVERT_TO_IMAGE_STRUCT_NO_STEP | ( | name | ) | update_image_workitem_ptr(name##_ptr, name##_offset_first_element_in_bytes, name##_stride_x, 0, name##_stride_y, 0) |
Definition at line 107 of file helpers.h.
Referenced by hysteresis(), lktracker_stage0(), lktracker_stage1(), remap_bilinear(), remap_nearest_neighbour(), scale_bilinear(), scale_nearest_neighbour(), warp_affine_bilinear(), warp_affine_nearest_neighbour(), warp_perspective_bilinear(), and warp_perspective_nearest_neighbour().
#define CONVERT_TO_TENSOR3D_STRUCT | ( | name | ) |
Definition at line 119 of file helpers.h.
Referenced by arithmetic_add(), arithmetic_sub(), concatenate_depth(), concatenate_width(), dequantization_layer(), floor_layer(), normalization_layer_cross_map(), normalization_layer_in_map(), pixelwise_mul_float(), pixelwise_mul_int(), pooling_layer_2(), pooling_layer_3(), pooling_layer_MxN_nhwc(), pooling_layer_MxN_quantized_nchw(), pooling_layer_MxN_quantized_nhwc(), quantization_layer(), and reshape_layer().
#define CONVERT_TO_TENSOR3D_STRUCT_NO_STEP | ( | name | ) | update_tensor3D_workitem_ptr(name##_ptr, name##_offset_first_element_in_bytes, name##_stride_x, 0, name##_stride_y, 0, name##_stride_z, 0) |
Definition at line 123 of file helpers.h.
Referenced by reshape_layer(), and roi_pooling_layer().
#define CONVERT_TO_TENSOR4D_STRUCT | ( | name, | |
mod_size | |||
) |
#define CONVERT_TO_TENSOR4D_STRUCT_NO_STEP | ( | name, | |
mod_size | |||
) | update_tensor4D_workitem_ptr(name##_ptr, name##_offset_first_element_in_bytes, name##_stride_x, 0, name##_stride_y, 0, name##_stride_z, 0, name##_stride_w, 0, mod_size) |
#define CONVERT_TO_VECTOR_STRUCT | ( | name | ) | update_vector_workitem_ptr(name##_ptr, name##_offset_first_element_in_bytes, name##_stride_x, name##_step_x) |
Definition at line 98 of file helpers.h.
Referenced by copy_tensor(), dequantization_layer(), and l2_normalize().
#define CONVERT_TO_VECTOR_STRUCT_NO_STEP | ( | name | ) | update_vector_workitem_ptr(name##_ptr, name##_offset_first_element_in_bytes, name##_stride_x, 0) |
Definition at line 101 of file helpers.h.
Referenced by output_stage_quantized(), and roi_pooling_layer().
#define EXPAND | ( | x | ) | x |
Definition at line 37 of file helpers.h.
Referenced by softmax_layer_max_shift_exp_sum_serial().
#define IMAGE_DECLARATION | ( | name | ) |
#define TENSOR3D_DECLARATION | ( | name | ) |
#define TENSOR4D_DECLARATION | ( | name | ) |
#define VEC_DATA_TYPE | ( | type, | |
size | |||
) | VEC_DATA_TYPE_STR(type, size) |
#define VECTOR_DECLARATION | ( | name | ) |
#define VLOAD | ( | size | ) | VLOAD_STR(size) |
Definition at line 42 of file helpers.h.
Referenced by concatenate_depth(), concatenate_width(), floor_layer(), roi_pool_1x1(), softmax_layer_max_shift_exp_sum_parallel(), softmax_layer_max_shift_exp_sum_serial(), and transpose().
#define VSTORE | ( | size | ) | VSTORE_STR(size) |
Definition at line 45 of file helpers.h.
Referenced by concatenate_depth(), concatenate_width(), floor_layer(), softmax_layer_max_shift_exp_sum_parallel(), softmax_layer_max_shift_exp_sum_serial(), and transpose().
|
inline |
Get the pointer position of a Image.
[in] | img | Pointer to the starting position of the buffer |
[in] | x | Relative X position |
[in] | y | Relative Y position |
Definition at line 303 of file helpers.h.
References Image::ptr, Image::stride_x, and Image::stride_y.
Referenced by bilinear_interpolate_with_border(), channel_combine_NV(), convolution3x3(), convolution5x1(), convolution5x5(), convolution7x1(), convolution7x7(), convolution9x1(), convolution9x9(), convolution_rectangle(), convolution_separable1x5_static(), convolution_separable1x7_static(), convolution_separable1x9_static(), copy_planes_3p(), copy_to_keypoint(), arm_compute::test::validation::DATA_TEST_CASE(), derivative(), dilate(), erode(), arm_compute::test::validation::reference::fast_corners(), AssetsLibrary::fill(), fill_image_borders_constant(), fill_image_borders_replicate(), gaussian5x1_sub_y(), harris_score_1x5(), harris_score_1x7(), harris_score_3x3(), hist_border_kernel(), arm_compute::test::validation::reference::histogram(), hysteresis(), integral_horizontal(), integral_vertical(), lktracker_stage0(), lktracker_stage1(), mean_stddev_accumulate(), minmax(), non_linear_filter_box3x3(), non_linear_filter_box5x5(), non_linear_filter_cross3x3(), non_linear_filter_cross5x5(), non_linear_filter_disk3x3(), non_linear_filter_disk5x5(), non_max_suppression(), QuantizationInfo::operator==(), SimpleTensor< T >::operator[](), PaddingCalculator::PaddingCalculator(), RandomAccessor::RandomAccessor(), read_texels4(), reduction_operation(), scharr3x3(), PaddingCalculator::set_access_offset(), sobel1x5(), sobel3x3(), sobel5x1(), softmax_layer_max_shift_exp_sum_parallel(), softmax_layer_max_shift_exp_sum_serial(), softmax_layer_norm(), suppress_non_maximum(), transpose(), and arm_compute::test::validation::reference::widthconcatenate_layer().
|
inline |
Get the pointer position of a Tensor3D.
[in] | tensor | Pointer to the starting position of the buffer |
[in] | x | Relative X position |
[in] | y | Relative Y position |
[in] | z | Relative Z position |
Definition at line 315 of file helpers.h.
References Tensor3D::ptr, Tensor3D::stride_x, Tensor3D::stride_y, and Tensor3D::stride_z.
Referenced by concatenate_depth(), normalization_layer_cross_map(), normalization_layer_in_map(), pooling_layer_2(), pooling_layer_3(), pooling_layer_MxN_nhwc(), pooling_layer_MxN_quantized_nchw(), pooling_layer_MxN_quantized_nhwc(), reshape_layer(), roi_pool_1x1(), and roi_pooling_layer().
|
inline |
Get the pointer position of a Tensor4D.
[in] | tensor | Pointer to the starting position of the buffer |
[in] | x | Relative X position |
[in] | y | Relative Y position |
[in] | z | Relative Z position |
[in] | w | Relative W position |
Definition at line 328 of file helpers.h.
References Tensor4D::ptr, Tensor4D::stride_w, Tensor4D::stride_x, Tensor4D::stride_y, and Tensor4D::stride_z.
|
inline |
Wrap 3D tensor information into an image structure, and make the pointer point at this workitem's data.
[in] | ptr | Pointer to the starting postion of the buffer |
[in] | offset_first_element_in_bytes | The offset of the first element in the source image |
[in] | stride_x | Stride of the image in X dimension (in bytes) |
[in] | step_x | stride_x * number of elements along X processed per workitem(in bytes) |
[in] | stride_y | Stride of the image in Y dimension (in bytes) |
[in] | step_y | stride_y * number of elements along Y processed per workitem(in bytes) |
[in] | stride_z | Stride of the image in Z dimension (in bytes) |
[in] | step_z | stride_z * number of elements along Z processed per workitem(in bytes) |
Definition at line 229 of file helpers.h.
References Vector::offset_first_element_in_bytes, Image::offset_first_element_in_bytes, Vector::ptr, Image::ptr, and Vector::stride_x.
|
inline |
Wrap image information into an Image structure, and make the pointer point at this workitem's data.
[in] | ptr | Pointer to the starting postion of the buffer |
[in] | offset_first_element_in_bytes | The offset of the first element in the source image |
[in] | stride_x | Stride of the image in X dimension (in bytes) |
[in] | step_x | stride_x * number of elements along X processed per workitem(in bytes) |
[in] | stride_y | Stride of the image in Y dimension (in bytes) |
[in] | step_y | stride_y * number of elements along Y processed per workitem(in bytes) |
Definition at line 203 of file helpers.h.
References Vector::offset_first_element_in_bytes, Image::offset_first_element_in_bytes, Vector::ptr, Image::ptr, and Vector::stride_x.
|
inline |
Wrap 3D tensor information into an tensor structure, and make the pointer point at this workitem's data.
[in] | ptr | Pointer to the starting postion of the buffer |
[in] | offset_first_element_in_bytes | The offset of the first element in the source image |
[in] | stride_x | Stride of the image in X dimension (in bytes) |
[in] | step_x | stride_x * number of elements along X processed per workitem(in bytes) |
[in] | stride_y | Stride of the image in Y dimension (in bytes) |
[in] | step_y | stride_y * number of elements along Y processed per workitem(in bytes) |
[in] | stride_z | Stride of the image in Z dimension (in bytes) |
[in] | step_z | stride_z * number of elements along Z processed per workitem(in bytes) |
Definition at line 255 of file helpers.h.
References Vector::offset_first_element_in_bytes, Tensor3D::offset_first_element_in_bytes, Vector::ptr, Tensor3D::ptr, and Vector::stride_x.
|
inline |
Definition at line 269 of file helpers.h.
References Vector::offset_first_element_in_bytes, Tensor4D::offset_first_element_in_bytes, Vector::ptr, Tensor4D::ptr, and Vector::stride_x.
|
inline |
Wrap vector information into an Vector structure, and make the pointer point at this workitem's data.
[in] | ptr | Pointer to the starting postion of the buffer |
[in] | offset_first_element_in_bytes | The offset of the first element in the source vector |
[in] | stride_x | Stride of the vector in X dimension (in bytes) |
[in] | step_x | stride_x * number of elements along X processed per workitem(in bytes) |
Definition at line 180 of file helpers.h.
References Vector::offset_first_element_in_bytes, Vector::ptr, and Vector::stride_x.
|
inline |
Get the pointer position of a Vector.
[in] | vec | Pointer to the starting position of the buffer |
[in] | x | Relative X position |
Definition at line 292 of file helpers.h.
References Vector::ptr, and Vector::stride_x.
Referenced by output_stage_quantized(), and roi_pooling_layer().