Compute Library
 23.11
Window::Dimension Class Reference

Describe one of the image's dimensions with a start, end and step. More...

#include <Window.h>

Public Member Functions

constexpr Dimension (int start=0, int end=1, int step=1)
 Constructor, by default creates a dimension of 1. More...
 
 Dimension (const Dimension &d)=default
 
Dimensionoperator= (const Dimension &d)=default
 Default assignment operator to allow dimensions to be copied. More...
 
constexpr int start () const
 Return the start of the dimension. More...
 
constexpr int end () const
 Return the end of the dimension. More...
 
constexpr int step () const
 Return the step of the dimension. More...
 
void set_step (int step)
 Set the dimension's step. More...
 
void set_end (int end)
 Set the dimension's end. More...
 

Friends

bool operator== (const Dimension &lhs, const Dimension &rhs)
 Check whether two Dimensions are equal. More...
 

Detailed Description

Describe one of the image's dimensions with a start, end and step.

Iteration through the elements of the dimension is done like this: for(int v = start(); v < end(); v += step()) { ... }

Definition at line 79 of file Window.h.

Constructor & Destructor Documentation

◆ Dimension() [1/2]

constexpr Dimension ( int  start = 0,
int  end = 1,
int  step = 1 
)
inlineconstexpr

Constructor, by default creates a dimension of 1.

Parameters
[in]startStart of the dimension
[in]endEnd of the dimension
[in]stepStep between two elements of the dimension when iterating.

Definition at line 89 of file Window.h.

89  : _start(start), _end(end), _step(step)
90  {
91  }

◆ Dimension() [2/2]

Dimension ( const Dimension d)
default

Member Function Documentation

◆ end()

constexpr int end ( ) const
inlineconstexpr

Return the end of the dimension.

Definition at line 101 of file Window.h.

102  {
103  return _end;
104  }

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(), Window::adjust(), arm_compute::cpu::bilinear_neon_scale(), arm_compute::colorconvert_iyuv_to_nv12(), arm_compute::colorconvert_iyuv_to_rgb(), arm_compute::colorconvert_iyuv_to_yuv4(), arm_compute::colorconvert_nv12_to_iyuv(), arm_compute::colorconvert_nv12_to_rgb(), arm_compute::colorconvert_nv12_to_yuv4(), arm_compute::colorconvert_rgb_to_iyuv(), arm_compute::colorconvert_rgb_to_nv12(), arm_compute::colorconvert_yuyv_to_iyuv(), arm_compute::colorconvert_yuyv_to_nv12(), AccessWindowTranspose::compute_valid_region(), AccessWindowRectangle::compute_valid_region(), ClDequantizeKernel::configure(), ClElementWiseUnaryKernel::configure(), ClCopyKernel::configure(), ClFillKernel::configure(), ClQuantizeKernel::configure(), ClCropKernel::configure(), CLStridedSliceKernel::configure(), 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::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(), ICLKernel::gws_from_window(), arm_compute::cpu::instance_normalization_nchw(), IKernel::is_window_configured(), WindowIterator< L >::iterate_3D(), arm_compute::cpu::l2_normalize_x(), arm_compute::cpu::l2_normalize_yz(), arm_compute::cpu::matrix_addition_f32(), arm_compute::cpu::matrix_matrix_multiply_f32(), 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::operator<<(), arm_compute::cpu::poolingMxN_fp32_neon_nhwc(), arm_compute::cpu::poolingMxN_fp32_neon_nhwc_kernel_indices(), arm_compute::cpu::poolingMxN_q8_neon_nhwc(), arm_compute::cpu::poolingMxNxD_fp_neon_ndhwc(), arm_compute::cpu::roi_align(), NEROIPoolingLayerKernel::run(), CpuFillKernel::run_op(), CpuConvertQuantizedSignednessKernel::run_op(), CpuCopyKernel::run_op(), CpuConcatenateWidthKernel::run_op(), CpuConcatenateHeightKernel::run_op(), CpuFloorKernel::run_op(), CpuPool2dKernel::run_op(), CpuGemmLowpMatrixMultiplyKernel::run_op(), CpuGemmInterleave4x4Kernel::run_op(), ClCropKernel::run_op(), CpuCastKernel::run_op(), arm_compute::run_reverse(), Window::scale(), arm_compute::cpu::select_op_16(), arm_compute::cpu::select_op_32(), arm_compute::cpu::select_op_8(), Window::Dimension::set_end(), Window::shift(), 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::sve_fp32_activation(), arm_compute::cpu::sve_logits_1d_max(), AccessWindowTranspose::update_padding_if_needed(), AccessWindowTranspose::update_window_if_needed(), and AccessWindowRectangle::update_window_if_needed().

◆ operator=()

Dimension& operator= ( const Dimension d)
default

Default assignment operator to allow dimensions to be copied.

◆ set_end()

void set_end ( int  end)
inline

Set the dimension's end.

Parameters
[in]endThe new end

Definition at line 122 of file Window.h.

123  {
124  _end = end;
125  }

References Window::Dimension::end().

Referenced by arm_compute::opencl::kernels::validate_and_configure_window_for_mmul_kernels().

◆ set_step()

void set_step ( int  step)
inline

Set the dimension's step.

Parameters
[in]stepThe new step

Definition at line 114 of file Window.h.

115  {
116  _step = step;
117  }

References Window::Dimension::step().

◆ start()

constexpr int start ( ) const
inlineconstexpr

Return the start of the dimension.

Definition at line 96 of file Window.h.

97  {
98  return _start;
99  }

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(), Window::adjust(), arm_compute::cpu::bilinear_neon_scale(), arm_compute::colorconvert_iyuv_to_nv12(), arm_compute::colorconvert_iyuv_to_rgb(), arm_compute::colorconvert_iyuv_to_yuv4(), arm_compute::colorconvert_nv12_to_iyuv(), arm_compute::colorconvert_nv12_to_rgb(), arm_compute::colorconvert_nv12_to_yuv4(), arm_compute::colorconvert_rgb_to_iyuv(), arm_compute::colorconvert_rgb_to_nv12(), arm_compute::colorconvert_yuyv_to_iyuv(), arm_compute::colorconvert_yuyv_to_nv12(), AccessWindowTranspose::compute_valid_region(), AccessWindowRectangle::compute_valid_region(), ClDequantizeKernel::configure(), ClElementWiseUnaryKernel::configure(), ClCopyKernel::configure(), ClFillKernel::configure(), ClQuantizeKernel::configure(), ClCropKernel::configure(), CLStridedSliceKernel::configure(), CLTileKernel::configure(), 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::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(), ICLKernel::gws_from_window(), arm_compute::cpu::instance_normalization_nchw(), IKernel::is_window_configured(), WindowIterator< L >::iterate_3D(), arm_compute::cpu::l2_normalize_x(), arm_compute::cpu::l2_normalize_yz(), arm_compute::cpu::matrix_addition_f32(), arm_compute::cpu::matrix_matrix_multiply_f32(), 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::operator<<(), arm_compute::cpu::poolingMxN_fp32_neon_nhwc(), arm_compute::cpu::poolingMxN_fp32_neon_nhwc_kernel_indices(), arm_compute::cpu::poolingMxN_q8_neon_nhwc(), arm_compute::cpu::poolingMxNxD_fp_neon_ndhwc(), arm_compute::cpu::roi_align(), NEROIPoolingLayerKernel::run(), CpuFillKernel::run_op(), CpuConvertQuantizedSignednessKernel::run_op(), CpuConcatenateHeightKernel::run_op(), CpuConcatenateWidthKernel::run_op(), CpuFloorKernel::run_op(), CpuGemmLowpMatrixMultiplyKernel::run_op(), CpuPool2dKernel::run_op(), CpuGemmInterleave4x4Kernel::run_op(), ClCropKernel::run_op(), CpuCastKernel::run_op(), arm_compute::run_reverse(), Window::scale(), arm_compute::cpu::select_op_16(), arm_compute::cpu::select_op_32(), arm_compute::cpu::select_op_8(), Window::shift(), arm_compute::cpu::sub_qsymm16_neon(), arm_compute::cpu::sub_same_neon(), arm_compute::cpu::sve2_qasymm8_activation(), arm_compute::cpu::sve2_qasymm8_signed_activation(), arm_compute::cpu::sve2_qsymm16_activation(), arm_compute::cpu::sve_fp32_activation(), arm_compute::cpu::sve_logits_1d_max(), AccessWindowTranspose::update_padding_if_needed(), AccessWindowTranspose::update_window_if_needed(), and AccessWindowRectangle::update_window_if_needed().

◆ step()

constexpr int step ( ) const
inlineconstexpr

Return the step of the dimension.

Definition at line 106 of file Window.h.

107  {
108  return _step;
109  }

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(), Window::adjust(), arm_compute::cpu::bilinear_neon_scale(), arm_compute::colorconvert_iyuv_to_nv12(), arm_compute::colorconvert_iyuv_to_rgb(), arm_compute::colorconvert_iyuv_to_yuv4(), arm_compute::colorconvert_nv12_to_iyuv(), arm_compute::colorconvert_nv12_to_rgb(), arm_compute::colorconvert_nv12_to_yuv4(), arm_compute::colorconvert_rgb_to_iyuv(), arm_compute::colorconvert_rgb_to_nv12(), arm_compute::colorconvert_yuyv_to_iyuv(), arm_compute::colorconvert_yuyv_to_nv12(), AccessWindowTranspose::compute_valid_region(), AccessWindowRectangle::compute_valid_region(), ClDirectConv2dKernel::configure(), 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_quantized(), arm_compute::cpu::elementwise_op_quantized_signed(), ClTemplateCast::get_build_options(), ClTemplateLogits1DNorm::get_build_options(), ClTemplateReshape::get_build_options(), ClTemplateDirectConv2d::get_build_options(), ClTemplateResize::get_build_options(), ClTemplatePool2d::get_build_options(), ClTemplateActivation::get_build_options(), ICLKernel::gws_from_window(), WindowIterator< L >::iterate_3D(), arm_compute::cpu::nearest_neon_scale(), arm_compute::operator<<(), ClCropKernel::run_op(), Window::scale(), Window::Dimension::set_step(), Window::shift(), arm_compute::cpu::sub_qsymm16_neon(), arm_compute::cpu::sub_same_neon(), AccessWindowTranspose::update_padding_if_needed(), AccessWindowTranspose::update_window_if_needed(), AccessWindowRectangle::update_window_if_needed(), ClFillKernel::validate(), ClCropKernel::validate(), GpuCkwCast::write_component_code(), GpuCkwActivation::write_component_code(), GpuCkwPool2d::write_component_code(), GpuCkwDepthwiseConv2d::write_component_code(), and GpuCkwDirectConv2d::write_component_code().

Friends And Related Function Documentation

◆ operator==

bool operator== ( const Dimension lhs,
const Dimension rhs 
)
friend

Check whether two Dimensions are equal.

Parameters
[in]lhsLHS Dimensions
[in]rhsRHS Dimensions
Returns
True if the Dimensions are the same.

Definition at line 133 of file Window.h.

134  {
135  return (lhs._start == rhs._start) && (lhs._end == rhs._end) && (lhs._step == rhs._step);
136  }

The documentation for this class was generated from the following file:
arm_compute::Window::Dimension::start
constexpr int start() const
Return the start of the dimension.
Definition: Window.h:96
arm_compute::Window::Dimension::step
constexpr int step() const
Return the step of the dimension.
Definition: Window.h:106
arm_compute::Window::Dimension::end
constexpr int end() const
Return the end of the dimension.
Definition: Window.h:101