23.05
|
Iterator updated by execute_window_loop for each window element. More...
#include <Helpers.h>
Public Member Functions | |
constexpr | Iterator () |
Default constructor to create an empty iterator. More... | |
Iterator (const ITensor *tensor, const Window &window) | |
Create a container iterator for the metadata and allocation contained in the ITensor. More... | |
Iterator (size_t num_dims, const Strides &strides, uint8_t *buffer, size_t offset, const Window &window) | |
Create a container iterator for the tensor with the specified number of dimensions, stride, buffer pointer and window. More... | |
void | increment (size_t dimension) |
Increment the iterator along the specified dimension of the step value associated to the dimension. More... | |
constexpr size_t | offset () const |
Return the offset in bytes from the first element to the current position of the iterator. More... | |
constexpr uint8_t * | ptr () const |
Return a pointer to the current pixel. More... | |
void | reset (size_t dimension) |
Move the iterator back to the beginning of the specified dimension. More... | |
Iterator updated by execute_window_loop for each window element.
|
inline |
Default constructor to create an empty iterator.
Definition at line 90 of file Helpers.inl.
Create a container iterator for the metadata and allocation contained in the ITensor.
[in] | tensor | The tensor to associate to the iterator. |
[in] | window | The window which will be used to iterate over the tensor. |
Definition at line 95 of file Helpers.inl.
References ARM_COMPUTE_ERROR_ON, ITensor::buffer(), ITensor::info(), ITensorInfo::num_dimensions(), ITensorInfo::offset_first_element_in_bytes(), and ITensorInfo::strides_in_bytes().
|
inline |
Create a container iterator for the tensor with the specified number of dimensions, stride, buffer pointer and window.
[in] | num_dims | The number of dimensions. |
[in] | strides | The strides in bytes. |
[in] | buffer | The data buffer. |
[in] | offset | The offset in bytes from the beginning of the buffer to the first element of the tensor. |
[in] | window | The window which will be used to iterate over the tensor. |
Definition at line 104 of file Helpers.inl.
References ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_ERROR_ON_WINDOW_DIMENSIONS_GTE, arm_compute::test::validation::n, Dimensions< int >::num_max_dimensions, and Iterator::offset().
|
inline |
Increment the iterator along the specified dimension of the step value associated to the dimension.
[in] | dimension | Dimension to increment |
Definition at line 132 of file Helpers.inl.
References ARM_COMPUTE_ERROR_ON, arm_compute::test::validation::n, and Dimensions< int >::num_max_dimensions.
|
inline |
Return the offset in bytes from the first element to the current position of the iterator.
Definition at line 144 of file Helpers.inl.
Referenced by Iterator::Iterator(), arm_compute::cpu::poolingMxN_q8_neon_nhwc(), CpuFillKernel::run_op(), CpuConcatenateHeightKernel::run_op(), CpuConcatenateWidthKernel::run_op(), and NEFillBorderKernel::run_op().
|
inline |
Return a pointer to the current pixel.
Definition at line 149 of file Helpers.inl.
Referenced by arm_compute::cpu::add_qasymm8_signed_sve2(), arm_compute::cpu::add_qasymm8_sve2(), arm_compute::cpu::add_qsymm16_neon(), arm_compute::cpu::add_qsymm16_sve2(), arm_compute::cpu::add_same_neon(), arm_compute::cpu::add_same_sve(), arm_compute::cpu::add_sub_q8_neon_fixedpoint(), arm_compute::cpu::add_sub_qasymm8_neon(), arm_compute::cpu::add_sub_qasymm8_signed_neon(), arm_compute::cpu::avg_poolingMxNxD_q8_neon_ndhwc(), arm_compute::cpu::bilinear_neon_scale(), arm_compute::cpu::bounding_box_transform(), arm_compute::cpu::bounding_box_transform_qsymm16(), arm_compute::colorconvert_rgb_to_iyuv(), arm_compute::colorconvert_rgb_to_nv12(), arm_compute::colorconvert_rgb_to_rgbx(), arm_compute::colorconvert_rgb_to_u8(), arm_compute::colorconvert_rgb_to_yuv4(), arm_compute::colorconvert_rgbx_to_rgb(), arm_compute::colorconvert_yuyv_to_iyuv(), arm_compute::colorconvert_yuyv_to_nv12(), arm_compute::colorconvert_yuyv_to_rgb(), arm_compute::utils::compare_tensor(), arm_compute::cpu::compute_all_anchors(), arm_compute::cpu::compute_all_anchors_qasymm16(), CpuScaleKernel::configure(), NENormalizationLayerKernel::configure(), arm_compute::cpu::kernels::convolve_nchw(), arm_compute::cpu::kernels::convolve_nhwc(), ITensor::copy_from(), arm_compute::cpu::directconv3d_float_neon_ndhwc(), arm_compute::cpu::directconv3d_quantized_neon_ndhwc(), arm_compute::cpu::elementwise_arithmetic_op(), arm_compute::cpu::elementwise_arithmetic_quantized_op(), arm_compute::cpu::elementwise_comp_quantized_signed(), arm_compute::cpu::elementwise_comparison_op(), arm_compute::cpu::elementwise_comparison_quantized_op(), arm_compute::cpu::elementwise_op(), arm_compute::cpu::elementwise_op< int8_t >(), arm_compute::cpu::elementwise_op< uint8_t >(), arm_compute::cpu::elementwise_op_quantized(), arm_compute::cpu::elementwise_op_quantized_signed(), arm_compute::cpu::elementwise_sve_op(), arm_compute::utils::fill_random_tensor(), arm_compute::utils::fill_tensor_value(), arm_compute::utils::fill_tensor_vector(), arm_compute::cpu::fp_neon_activation_impl(), arm_compute::cpu::fused_batch_normalization_conv(), arm_compute::cpu::fused_batch_normalization_dwc_nchw(), arm_compute::cpu::fused_batch_normalization_dwc_nhwc(), arm_compute::cpu::instance_normalization_nchw(), arm_compute::cpu::l2_normalize_x(), arm_compute::cpu::l2_normalize_yz(), arm_compute::utils::load_trained_data(), arm_compute::cpu::matrix_addition_f32(), arm_compute::cpu::matrix_matrix_multiply_f32(), arm_compute::cpu::max_poolingMxNxD_q8_neon_ndhwc(), arm_compute::cpu::max_unpooling(), arm_compute::cpu::mean_stddev_normalization(), arm_compute::cpu::nearest_neon_scale(), arm_compute::cpu::neon_logits_1d_max(), arm_compute::cpu::neon_qasymm8_activation(), arm_compute::cpu::neon_qasymm8_meanstddevnorm(), arm_compute::cpu::neon_qasymm8_signed_activation(), arm_compute::cpu::neon_qsymm16_activation(), arm_compute::cpu::neon_range_function(), arm_compute::cpu::neon_softmax_logits_1d_float(), arm_compute::cpu::neon_softmax_logits_1d_quantized(), arm_compute::cpu::poolingMxN_fp32_neon_nhwc(), arm_compute::cpu::poolingMxN_fp32_neon_nhwc_kernel_indices(), arm_compute::cpu::poolingMxN_q8_neon_nhwc(), CPPUpsampleKernel::run(), NEBitwiseNotKernel::run(), NEBitwiseXorKernel::run(), NEBitwiseAndKernel::run(), NEBitwiseOrKernel::run(), NETileKernel::run(), NESpaceToDepthLayerKernel::run(), NEDepthToSpaceLayerKernel::run(), NEFFTScaleKernel::run(), NEReorgLayerKernel::run(), NEFFTRadixStageKernel::run(), NEStackLayerKernel::run(), NEBatchToSpaceLayerKernel::run(), NESpaceToBatchLayerKernel::run(), CpuConvertQuantizedSignednessKernel::run_op(), CpuCopyKernel::run_op(), CpuConcatenateHeightKernel::run_op(), CpuConcatenateWidthKernel::run_op(), CpuConvertFullyConnectedWeightsKernel::run_op(), CpuFloorKernel::run_op(), CpuGemmInterleave4x4Kernel::run_op(), CpuCastKernel::run_op(), CpuCol2ImKernel::run_op(), NEFillBorderKernel::run_op(), CpuWeightsReshapeKernel::run_op(), CpuGemmTranspose1xWKernel::run_op(), NEStridedSliceKernel::run_op(), arm_compute::run_reverse(), arm_compute::utils::save_to_npy(), arm_compute::utils::save_to_ppm(), arm_compute::cpu::select_op(), arm_compute::cpu::sub_qsymm16_neon(), arm_compute::cpu::sub_same_neon(), arm_compute::cpu::sve2_q8_elementwise_unary(), arm_compute::cpu::sve2_qasymm8_activation(), arm_compute::cpu::sve2_qasymm8_signed_activation(), arm_compute::cpu::sve2_qsymm16_activation(), arm_compute::cpu::sve2_softmax_logits_1d_quantized(), arm_compute::cpu::sve_fp32_activation(), arm_compute::cpu::sve_logits_1d_max(), arm_compute::cpu::sve_softmax_logits_1d_float(), arm_compute::test::validation::TEST_CASE(), CpuQuantizeKernel::validate(), CpuGemmLowpMatrixAReductionKernel::validate(), NEFFTDigitReverseKernel::validate(), CpuGemmLowpMatrixBReductionKernel::validate(), and arm_compute::cpu::vector_matrix_multiply_f32().
|
inline |
Move the iterator back to the beginning of the specified dimension.
[in] | dimension | Dimension to reset |
Definition at line 154 of file Helpers.inl.
References ARM_COMPUTE_ERROR_ON, arm_compute::test::validation::n, and Dimensions< int >::num_max_dimensions.