Compute Library
 21.02
Window Class Reference

Describe a multidimensional execution window. More...

#include <Window.h>

Data Structures

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

Public Member Functions

constexpr Window ()
 Default constructor: create a window containing a single element. More...
 
 Window (const Window &src)
 Copy constructor. More...
 
Windowoperator= (const Window &rhs)
 Copy assignment operator. More...
 
constexpr const Dimensionoperator[] (size_t dimension) const
 Read only access to a given dimension of the window. More...
 
constexpr const Dimensionx () const
 Alias to access the first dimension of the window. More...
 
constexpr const Dimensiony () const
 Alias to access the second dimension of the window. More...
 
constexpr const Dimensionz () const
 Alias to access the third dimension of the window. More...
 
void set (size_t dimension, const Dimension &dim)
 Set the values of a given dimension. More...
 
void set_broadcasted (size_t dimension)
 Set the dimension as broadcasted dimension. More...
 
bool is_broadcasted (size_t dimension) const
 Return whether a dimension has been broadcasted. More...
 
void use_tensor_dimensions (const TensorShape &shape, size_t first_dimension=Window::DimX)
 Use the tensor's dimensions to fill the window dimensions. More...
 
void shift (size_t dimension, int shift_value)
 Shift the values of a given dimension by the given shift_value. More...
 
Window shift_dimensions (unsigned int shift_value) const
 Shift down all the dimensions of a window. More...
 
void adjust (size_t dimension, int adjust_value, bool is_at_start)
 Adjust the start or end of a given dimension by the given value. More...
 
void scale (size_t dimension, float scale_value)
 Scale the values of a given dimension by the given scale_value. More...
 
void set_dimension_step (size_t dimension, int step)
 Set the step of a given dimension. More...
 
void validate () const
 Will validate all the window's dimensions' values when asserts are enabled. More...
 
constexpr size_t num_iterations (size_t dimension) const
 Return the number of iterations needed to iterate through a given dimension. More...
 
size_t num_iterations_total () const
 Return the total number of iterations needed to iterate through the entire window. More...
 
TensorShape shape () const
 Return the shape of the window in number of steps. More...
 
Window split_window (size_t dimension, size_t id, size_t total) const
 Split a window into a set of sub windows along a given dimension. More...
 
Window first_slice_window_1D () const
 First 1D slice of the window. More...
 
Window first_slice_window_2D () const
 First 2D slice of the window. More...
 
Window first_slice_window_3D () const
 First 3D slice of the window. More...
 
Window first_slice_window_4D () const
 First 4D slice of the window. More...
 
bool slide_window_slice_1D (Window &slice) const
 Slide the passed 1D window slice. More...
 
bool slide_window_slice_2D (Window &slice) const
 Slide the passed 2D window slice. More...
 
bool slide_window_slice_3D (Window &slice) const
 Slide the passed 3D window slice. More...
 
bool slide_window_slice_4D (Window &slice) const
 Slide the passed 4D window slice. More...
 
Window collapse_if_possible (const Window &full_window, size_t first, size_t last, bool *has_collapsed=nullptr) const
 Collapse the dimensions between first and last if possible. More...
 
Window collapse_if_possible (const Window &full_window, size_t first, bool *has_collapsed=nullptr) const
 Collapse the dimensions higher than first if possible. More...
 
Window collapse (const Window &full_window, size_t first, size_t last=Coordinates::num_max_dimensions) const
 Collapse the dimensions between first and last. More...
 
Window broadcast_if_dimension_le_one (const TensorShape &shape) const
 Don't advance in the dimension where shape is less equal to 1. More...
 
Window broadcast_if_dimension_le_one (const ITensorInfo &info) const
 Don't advance in the dimension where shape of info is less equal to 1. More...
 

Static Public Attributes

static constexpr size_t DimX = 0
 Alias for dimension 0 also known as X dimension. More...
 
static constexpr size_t DimY = 1
 Alias for dimension 1 also known as Y dimension. More...
 
static constexpr size_t DimZ = 2
 Alias for dimension 2 also known as Z dimension. More...
 
static constexpr size_t DimW = 3
 Alias for dimension 3 also known as W dimension. More...
 

Friends

void swap (Window &lhs, Window &rhs)
 Friend function that swaps the contents of two windows. More...
 

Detailed Description

Describe a multidimensional execution window.

Definition at line 39 of file Window.h.

Constructor & Destructor Documentation

◆ Window() [1/2]

constexpr Window ( )
inline

Default constructor: create a window containing a single element.

Definition at line 52 of file Window.h.

53  : _dims(), _is_broadcasted(utility::generate_array<bool, Coordinates::num_max_dimensions, false>::value)
54  {
55  }

◆ Window() [2/2]

Window ( const Window src)
inline

Copy constructor.

Parameters
[in]srcCopy the values from src to a new object

Definition at line 26 of file Window.inl.

27  : _dims(), _is_broadcasted(utility::generate_array<bool, Coordinates::num_max_dimensions, false>::value)
28 {
29  for(size_t i = 0; i < Coordinates::num_max_dimensions; ++i)
30  {
31  set(i, src[i]);
32  _is_broadcasted[i] = src.is_broadcasted(i);
33  }
34 }
SimpleTensor< float > src
Definition: DFT.cpp:155
static constexpr size_t num_max_dimensions
Number of dimensions the tensor has.
Definition: Dimensions.h:46

Member Function Documentation

◆ adjust()

void adjust ( size_t  dimension,
int  adjust_value,
bool  is_at_start 
)
inline

Adjust the start or end of a given dimension by the given value.

Parameters
[in]dimensionThe dimension to adjust
[in]adjust_valueThe adjusted value.
[in]is_at_startThe flag to indicate whether adjust the start or end of the dimension.

Definition at line 140 of file Window.inl.

References ARM_COMPUTE_ERROR_ON, Window::Dimension::end(), Dimensions< int >::num_max_dimensions, Window::Dimension::start(), and Window::Dimension::step().

Referenced by GCDepthwiseConvolutionLayer3x3Kernel::run(), GCDirectConvolutionLayerKernel< kernel_size >::run(), CLDepthwiseConvolutionLayer3x3NCHWKernel::run(), CLDirectConvolutionLayerKernel::run(), and Window::z().

141 {
143  Window::Dimension &d = _dims[dimension];
144 
145  if(is_at_start)
146  {
147  d = Window::Dimension(d.start() + adjust_value, d.end(), d.step());
148  }
149  else
150  {
151  d = Window::Dimension(d.start(), d.end() + adjust_value, d.step());
152  }
153 }
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
Definition: Error.h:466
static constexpr size_t num_max_dimensions
Number of dimensions the tensor has.
Definition: Dimensions.h:46

◆ broadcast_if_dimension_le_one() [1/2]

Window broadcast_if_dimension_le_one ( const TensorShape shape) const
inline

Don't advance in the dimension where shape is less equal to 1.

Parameters
[in]shapeA TensorShape.
Returns
Broadcast window.

Definition at line 120 of file Window.inl.

References Dimensions< size_t >::num_max_dimensions, and Window::set_broadcasted().

Referenced by arm_compute::cpu::add_qasymm8_neon(), arm_compute::cpu::add_qasymm8_signed_neon(), arm_compute::cpu::add_qsymm16_neon(), arm_compute::cpu::add_s16_u8_s16_neon(), arm_compute::cpu::add_same_neon(), arm_compute::cpu::add_u8_u8_s16_neon(), CLPixelWiseMultiplicationKernel::border_size(), Window::broadcast_if_dimension_le_one(), Window::collapse_if_possible(), arm_compute::cpu::elementwise_comp_quantized_signed(), arm_compute::cpu::elementwise_op(), arm_compute::cpu::elementwise_op_quantized(), arm_compute::cpu::elementwise_op_quantized_signed(), CLComparisonKernel::run(), ClElementwiseKernel::run_op(), CLPixelWiseMultiplicationKernel::run_op(), CLComplexPixelWiseMultiplicationKernel::run_op(), arm_compute::cpu::sub_qasymm8_neon(), arm_compute::cpu::sub_qasymm8_signed_neon(), arm_compute::cpu::sub_qsymm16_neon(), arm_compute::cpu::sub_same_neon(), and arm_compute::cpu::sub_u8_u8_s16_neon().

121 {
122  Window broadcastWin(*this);
123  for(size_t d = 0; d < TensorShape::num_max_dimensions; ++d)
124  {
125  if(shape[d] <= 1)
126  {
127  broadcastWin.set_broadcasted(d);
128  }
129  }
130  return broadcastWin;
131 }
constexpr Window()
Default constructor: create a window containing a single element.
Definition: Window.h:52
TensorShape shape() const
Return the shape of the window in number of steps.
Definition: Window.inl:284
static constexpr size_t num_max_dimensions
Number of dimensions the tensor has.
Definition: Dimensions.h:46

◆ broadcast_if_dimension_le_one() [2/2]

Window broadcast_if_dimension_le_one ( const ITensorInfo info) const
inline

Don't advance in the dimension where shape of info is less equal to 1.

Parameters
[in]infoAn ITensorInfo.
Returns
Broadcast window.

Definition at line 406 of file Window.h.

References Window::broadcast_if_dimension_le_one(), arm_compute::test::validation::reference::slice(), Window::swap, and ITensorInfo::tensor_shape().

407  {
408  return broadcast_if_dimension_le_one(info.tensor_shape());
409  }
Window broadcast_if_dimension_le_one(const TensorShape &shape) const
Don&#39;t advance in the dimension where shape is less equal to 1.
Definition: Window.inl:120
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)

◆ collapse()

Window collapse ( const Window full_window,
size_t  first,
size_t  last = Coordinates::num_max_dimensions 
) const
inline

Collapse the dimensions between first and last.

A dimension is collapsable if it starts from 0 and matches the corresponding dimension in the full_window

Parameters
[in]full_windowFull window window has been created from.
[in]firstStart dimension into which the following are collapsed.
[in]lastEnd (exclusive) dimension to collapse.
Returns
Collapsed window if successful.

Definition at line 111 of file Window.inl.

References ARM_COMPUTE_ERROR_ON, and Window::collapse_if_possible().

Referenced by Window::collapse_if_possible(), CLReverseKernel::run(), CLComputeAllAnchorsKernel::run(), CLScaleKernel::run(), CLInstanceNormalizationLayerKernel::run(), CLStackLayerKernel::run(), CLFuseBatchNormalizationKernel::run(), CLDepthwiseConvolutionLayerNativeKernel::run(), and ClPermuteKernel::run_op().

112 {
113  bool has_collapsed = false;
114  Window collapsed = collapse_if_possible(full_window, first, last, &has_collapsed);
115  // Make sure that the window has collapsed
116  ARM_COMPUTE_ERROR_ON(!has_collapsed);
117  return collapsed;
118 }
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
Definition: Error.h:466
Window collapse_if_possible(const Window &full_window, size_t first, size_t last, bool *has_collapsed=nullptr) const
Collapse the dimensions between first and last if possible.
Definition: Window.inl:68
constexpr Window()
Default constructor: create a window containing a single element.
Definition: Window.h:52

◆ collapse_if_possible() [1/2]

Window collapse_if_possible ( const Window full_window,
size_t  first,
size_t  last,
bool *  has_collapsed = nullptr 
) const
inline

Collapse the dimensions between first and last if possible.

A dimension is collapsable if it starts from 0 and matches the corresponding dimension in the full_window

Parameters
[in]full_windowFull window window has been created from.
[in]firstStart dimension into which the following are collapsed.
[in]lastEnd (exclusive) dimension to collapse.
[out]has_collapsed(Optional) Whether the window was collapsed.
Returns
Collapsed window.

Definition at line 68 of file Window.inl.

References arm_compute::mlgo::parser::end(), Window::set(), enable_tracing::start, and arm_compute::cpu::step.

Referenced by Window::collapse(), Window::collapse_if_possible(), CLDepthConvertLayerKernel::configure(), arm_compute::cpu::fp32_neon_activation(), arm_compute::cpu::qasymm8_neon_activation(), arm_compute::cpu::qasymm8_signed_neon_activation(), arm_compute::cpu::qsymm16_neon_activation(), GCActivationLayerKernel::run(), GCLogits1DShiftExpSumKernel::run(), NEConvertQuantizedSignednessKernel::run(), CLDequantizationLayerKernel::run(), GCPoolingLayerKernel::run(), NEReorgLayerKernel::run(), CLSelectKernel::run(), CLDeconvolutionLayerUpsampleKernel::run(), CLFFTScaleKernel::run(), CLQuantizationLayerKernel::run(), CLComparisonKernel::run(), CLGatherKernel::run(), CLMinMaxLayerKernel::run(), CLNormalizationLayerKernel::run(), CLTileKernel::run(), CLGEMMLowpQuantizeDownInt32ScaleByFixedPointKernel::run(), CLFFTDigitReverseKernel::run(), GCCol2ImKernel::run(), GCIm2ColKernel::run(), CLNormalizePlanarYUVLayerKernel::run(), CLFillBorderKernel::run(), CLFFTRadixStageKernel::run(), CLGEMMLowpQuantizeDownInt32ScaleByFloatKernel::run(), CLGEMMLowpQuantizeDownInt32ScaleKernel::run(), CLLogits1DMaxShiftExpSumKernel::run(), CLCol2ImKernel::run(), CLDeconvolutionReshapeOutputKernel::run(), GCLogits1DNormKernel::run(), CLDepthwiseConvolutionLayer3x3NCHWKernel::run(), CLGEMMLowpOffsetContributionKernel::run(), CLDepthwiseConvolutionLayer3x3NHWCKernel::run(), CLWinogradInputTransformKernel::run(), CLWinogradOutputTransformKernel::run(), CLGEMMLowpOffsetContributionOutputStageKernel::run(), CLIm2ColKernel::run(), CLGEMMLowpMatrixAReductionKernel::run(), CLLogits1DNormKernel::run(), CLGEMMLowpMatrixBReductionKernel::run(), CpuFillKernel::run_op(), ClElementwiseKernel::run_op(), ClReshapeKernel::run_op(), ClFloorKernel::run_op(), ClElementWiseUnaryKernel::run_op(), ClCopyKernel::run_op(), ClActivationKernel::run_op(), ClPoolingKernel::run_op(), ClFillKernel::run_op(), CLStridedSliceKernel::run_op(), CLFillBorderKernel::run_op(), CLPixelWiseMultiplicationKernel::run_op(), CLComplexPixelWiseMultiplicationKernel::run_op(), Window::slide_window_slice_4D(), NEThresholdKernel::validate(), NEQuantizationLayerKernel::validate(), NEGEMMLowpMatrixAReductionKernel::validate(), and NEGEMMLowpMatrixBReductionKernel::validate().

70 {
71  Window collapsed(*this);
72 
73  bool is_collapsable = true;
74  int collapsed_end = _dims[first].end();
75 
76  for(size_t d = first + 1; is_collapsable && (d < last); ++d)
77  {
78  // The _dims's dimension must match the full _dims dimension to be collapsable:
79  is_collapsable = (_dims[d].start() == 0) && (full_window[d].start() == 0) && (_dims[d].step() <= 1)
80  && (full_window[d].end() == _dims[d].end());
81  collapsed_end *= _dims[d].end();
82  }
83 
84  if(is_collapsable)
85  {
86  collapsed._dims.at(first).set_end(collapsed_end);
87  for(size_t d = first + 1; is_collapsable && (d < last); ++d)
88  {
89  collapsed.set(d, Dimension());
90  }
91  }
92 
93  if(has_collapsed != nullptr)
94  {
95  *has_collapsed = is_collapsable;
96  }
97 
98  return collapsed;
99 }
constexpr Window()
Default constructor: create a window containing a single element.
Definition: Window.h:52
void end(TokenStream &in, bool &valid)
Definition: MLGOParser.cpp:290
constexpr int step
Definition: fp32.cpp:35

◆ collapse_if_possible() [2/2]

Window collapse_if_possible ( const Window full_window,
size_t  first,
bool *  has_collapsed = nullptr 
) const
inline

Collapse the dimensions higher than first if possible.

A dimension is collapsable if it starts from 0 and matches the corresponding dimension in the full_window

Parameters
[in]full_windowFull window window has been created from.
[in]firstStart dimension into which the following are collapsed.
[out]has_collapsed(Optional) Whether the window was collapsed.
Returns
Collapsed window.

Definition at line 375 of file Window.h.

References Window::broadcast_if_dimension_le_one(), Window::collapse(), Window::collapse_if_possible(), and Dimensions< int >::num_max_dimensions.

376  {
377  return collapse_if_possible(full_window, first, Coordinates::num_max_dimensions, has_collapsed);
378  }
Window collapse_if_possible(const Window &full_window, size_t first, size_t last, bool *has_collapsed=nullptr) const
Collapse the dimensions between first and last if possible.
Definition: Window.inl:68
static constexpr size_t num_max_dimensions
Number of dimensions the tensor has.
Definition: Dimensions.h:46

◆ first_slice_window_1D()

◆ first_slice_window_2D()

Window first_slice_window_2D ( ) const
inline

First 2D slice of the window.

Returns
The first slice of the window.

Definition at line 283 of file Window.h.

Referenced by ICLSimple2DKernel::run(), IGCSimple2DKernel::run(), GCTransposeKernel::run(), GCGEMMMatrixAccumulateBiasesKernel::run(), GCGEMMMatrixAdditionKernel::run(), GCAbsoluteDifferenceKernel::run(), GCGEMMTranspose1xWKernel::run(), CLGaussianPyramidHorKernel::run(), CLBitwiseKernel::run(), CLHistogramKernel::run(), CLMinMaxKernel::run(), CLGradientKernel::run(), CLAbsoluteDifferenceKernel::run(), CLRemapKernel::run(), CLHOGOrientationBinningKernel::run(), CLSobel3x3Kernel::run(), CLDerivativeKernel::run(), NEDepthToSpaceLayerKernel::run(), CLSobel5x5HorKernel::run(), CLSobel7x7HorKernel::run(), GCGEMMInterleave4x4Kernel::run(), CLQLSTMLayerNormalizationKernel::run(), CLScaleKernel::run(), CLMagnitudePhaseKernel::run(), CLIntegralImageVertKernel::run(), CLFastCornersKernel::run(), GCWeightsReshapeKernel::run(), CLMeanStdDevNormalizationKernel::run(), GCGEMMMatrixMultiplyKernel::run(), CLMeanStdDevKernel::run(), CLPriorBoxLayerKernel::run(), CLScharr3x3Kernel::run(), CLChannelExtractKernel::run(), CLHarrisScoreKernel::run(), CLReductionOperationKernel::run(), CLHOGDetectorKernel::run(), CLL2NormalizeLayerKernel::run(), CLBoundingBoxTransformKernel::run(), CLChannelCombineKernel::run(), CLArgMinMaxLayerKernel::run(), CLGaussianPyramidVertKernel::run(), CLHistogramBorderKernel::run(), CLColorConvertKernel::run(), CLSpaceToBatchLayerKernel::run(), CLWeightsReshapeKernel::run(), CLHOGBlockNormalizationKernel::run(), CLEdgeNonMaxSuppressionKernel::run(), CLMinMaxLocationKernel::run(), CLIm2ColKernel::run(), CLGEMMLowpMatrixAReductionKernel::run(), CLCopyToArrayKernel::run(), CLSobel5x5VertKernel::run(), CLSobel7x7VertKernel::run(), CLEdgeTraceKernel::run(), CLGEMMLowpMatrixBReductionKernel::run(), and CLConvolutionRectangleKernel::run().

284  {
285  return first_slice_window<2>();
286  };

◆ first_slice_window_3D()

Window first_slice_window_3D ( ) const
inline

First 3D slice of the window.

Returns
The first slice of the window.

Definition at line 291 of file Window.h.

Referenced by ICLSimple3DKernel::run(), IGCSimple3DKernel::run(), GCScaleKernel::run(), GCPixelWiseMultiplicationKernel::run(), GCDepthwiseConvolutionLayer3x3Kernel::run(), GCNormalizationLayerKernel::run(), GCActivationLayerKernel::run(), GCDepthConcatenateLayerKernel::run(), GCLogits1DShiftExpSumKernel::run(), GCDropoutLayerKernel::run(), GCDirectConvolutionLayerKernel< kernel_size >::run(), GCFillBorderKernel::run(), NEDepthToSpaceLayerKernel::run(), NESpaceToDepthLayerKernel::run(), GCPoolingLayerKernel::run(), GCArithmeticAdditionKernel::run(), GCNormalizePlanarYUVLayerKernel::run(), CLDepthToSpaceLayerKernel::run(), GCTensorShiftKernel::run(), CLSelectKernel::run(), CLSpaceToDepthLayerKernel::run(), CLDeconvolutionLayerUpsampleKernel::run(), CLMaxUnpoolingLayerKernel::run(), CLFFTScaleKernel::run(), CLQuantizationLayerKernel::run(), CLMinMaxLayerKernel::run(), CLNormalizationLayerKernel::run(), CLComparisonKernel::run(), CLFFTDigitReverseKernel::run(), CLGEMMLowpQuantizeDownInt32ScaleByFixedPointKernel::run(), GCWeightsReshapeKernel::run(), CLReorgLayerKernel::run(), CLROIPoolingLayerKernel::run(), GCCol2ImKernel::run(), GCIm2ColKernel::run(), CLNormalizePlanarYUVLayerKernel::run(), CLPadLayerKernel::run(), GCBatchNormalizationLayerKernel::run(), CLReductionOperationKernel::run(), NEBatchToSpaceLayerKernel::run(), CLFFTRadixStageKernel::run(), CLFillBorderKernel::run(), CLL2NormalizeLayerKernel::run(), CLGEMMLowpQuantizeDownInt32ScaleByFloatKernel::run(), CLGEMMLowpQuantizeDownInt32ScaleKernel::run(), CLLogits1DMaxShiftExpSumKernel::run(), CLArgMinMaxLayerKernel::run(), CLGEMMLowpMatrixMultiplyNativeKernel::run(), NESpaceToBatchLayerKernel::run(), CLGEMMReshapeLHSMatrixKernel::run(), CLCol2ImKernel::run(), GCLogits1DNormKernel::run(), CLROIAlignLayerKernel::run(), CLBatchToSpaceLayerKernel::run(), CLDepthwiseConvolutionLayer3x3NCHWKernel::run(), CLWinogradInputTransformKernel::run(), CLGEMMLowpOffsetContributionKernel::run(), CLBatchNormalizationLayerKernel::run(), CLGEMMMatrixMultiplyKernel::run(), CLFuseBatchNormalizationKernel::run(), CLDirectConvolutionLayerKernel::run(), CLGEMMLowpMatrixMultiplyReshapedKernel::run(), CLGEMMMatrixMultiplyNativeKernel::run(), CLSpaceToBatchLayerKernel::run(), CLWeightsReshapeKernel::run(), CLGEMMLowpOffsetContributionOutputStageKernel::run(), CLIm2ColKernel::run(), CLGEMMReshapeRHSMatrixKernel::run(), CLGEMMLowpMatrixMultiplyReshapedOnlyRHSKernel::run(), CLLogits1DNormKernel::run(), CLGEMMMatrixMultiplyReshapedOnlyRHSKernel::run(), CLGEMMMatrixMultiplyReshapedKernel::run(), ClElementwiseKernel::run_op(), ClReshapeKernel::run_op(), ClCopyKernel::run_op(), ClElementWiseUnaryKernel::run_op(), ClActivationKernel::run_op(), ClBatchConcatenateKernel::run_op(), ClDepthConcatenateKernel::run_op(), CLFillBorderKernel::run_op(), CLPixelWiseMultiplicationKernel::run_op(), and CLComplexPixelWiseMultiplicationKernel::run_op().

292  {
293  return first_slice_window<3>();
294  };

◆ first_slice_window_4D()

◆ is_broadcasted()

bool is_broadcasted ( size_t  dimension) const
inline

Return whether a dimension has been broadcasted.

Parameters
[in]dimensionThe requested dimension
Returns
true if the dimension has been broadcasted

Definition at line 62 of file Window.inl.

References ARM_COMPUTE_ERROR_ON, and Dimensions< int >::num_max_dimensions.

Referenced by ICLKernel::add_tensor_argument(), and Window::z().

63 {
65  return _is_broadcasted[dimension];
66 }
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
Definition: Error.h:466
static constexpr size_t num_max_dimensions
Number of dimensions the tensor has.
Definition: Dimensions.h:46

◆ num_iterations()

constexpr size_t num_iterations ( size_t  dimension) const
inline

Return the number of iterations needed to iterate through a given dimension.

Parameters
[in]dimensionThe requested dimension
Returns
The number of iterations

Definition at line 182 of file Window.inl.

Referenced by ClCopyKernel::configure(), ClFillKernel::configure(), ClCropKernel::configure(), Window::num_iterations_total(), IScheduler::num_threads_hint(), SingleThreadScheduler::schedule(), OMPScheduler::schedule_op(), Window::split_window(), and Window::z().

183 {
184  // Precondition: dimension < Coordinates::num_max_dimensions
185  // Precondition: (end - start) % step == 0
186  return (_dims.at(dimension).end() - _dims.at(dimension).start()) / _dims.at(dimension).step();
187 }

◆ num_iterations_total()

size_t num_iterations_total ( ) const
inline

Return the total number of iterations needed to iterate through the entire window.

Returns
Number of total iterations

Definition at line 294 of file Window.inl.

References Window::num_iterations(), and Dimensions< int >::num_max_dimensions.

Referenced by Window::z().

295 {
296  size_t total = 1;
297  for(size_t d = 0; d < Coordinates::num_max_dimensions; ++d)
298  {
299  total *= num_iterations(d);
300  }
301  return total;
302 }
constexpr size_t num_iterations(size_t dimension) const
Return the number of iterations needed to iterate through a given dimension.
Definition: Window.inl:182
static constexpr size_t num_max_dimensions
Number of dimensions the tensor has.
Definition: Dimensions.h:46

◆ operator=()

Window & operator= ( const Window rhs)
inline

Copy assignment operator.

Parameters
[in]rhsCopy the values from rhs to the current object
Returns
Reference to the updated object

Definition at line 36 of file Window.inl.

References Window::swap.

37 {
38  Window tmp(rhs);
39  swap(*this, tmp);
40  return *this;
41 }
friend void swap(Window &lhs, Window &rhs)
Friend function that swaps the contents of two windows.
Definition: Window.inl:304
constexpr Window()
Default constructor: create a window containing a single element.
Definition: Window.h:52

◆ operator[]()

constexpr const Window::Dimension & operator[] ( size_t  dimension) const
inline

Read only access to a given dimension of the window.

Note
Precondition: dimension < Coordinates::num_max_dimensions
Parameters
[in]dimensionThe dimension to access
Returns
The requested dimension

Definition at line 43 of file Window.inl.

Referenced by Window::Dimension::set_end().

44 {
45  // Precondition: dimension < Coordinates::num_max_dimensions
46  return _dims.at(dimension);
47 }

◆ scale()

void scale ( size_t  dimension,
float  scale_value 
)
inline

Scale the values of a given dimension by the given scale_value.

Note
The end of the window is rounded up to be a multiple of step after the scaling.
Parameters
[in]dimensionThe dimension to scale
[in]scale_valueValue to scale the start, end and step values of.

Definition at line 155 of file Window.inl.

References ARM_COMPUTE_ERROR_ON, arm_compute::ceil_to_multiple(), Window::Dimension::end(), Dimensions< int >::num_max_dimensions, Window::Dimension::start(), and Window::Dimension::step().

Referenced by NEGaussianPyramidHorKernel::run(), CLGaussianPyramidHorKernel::run(), GCGEMMInterleave4x4Kernel::run(), NEGaussianPyramidVertKernel::run(), CLGaussianPyramidVertKernel::run(), NEGEMMInterleave4x4Kernel::validate(), and Window::z().

156 {
158  Window::Dimension &d = _dims[dimension];
159  const int scaled_step = d.step() * scale_value;
160  const int scaled_start = d.start() * scale_value;
161  const int scaled_diff = (d.end() - d.start()) * scale_value;
162  const int scaled_end = scaled_start + ceil_to_multiple(scaled_diff, scaled_step);
163 
164  d = Window::Dimension(scaled_start, scaled_end, scaled_step);
165 }
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
Definition: Error.h:466
auto ceil_to_multiple(S value, T divisor) -> decltype(((value+divisor - 1)/divisor) *divisor)
Computes the smallest number larger or equal to value that is a multiple of divisor.
Definition: Utils.h:71
static constexpr size_t num_max_dimensions
Number of dimensions the tensor has.
Definition: Dimensions.h:46

◆ set()

void set ( size_t  dimension,
const Dimension dim 
)
inline

Set the values of a given dimension.

Parameters
[in]dimensionThe dimension to set
[in]dimThe values to set the dimension to

Definition at line 49 of file Window.inl.

References ARM_COMPUTE_ERROR_ON, and Dimensions< int >::num_max_dimensions.

Referenced by arm_compute::cpu::add_qasymm8_neon(), arm_compute::cpu::add_qasymm8_signed_neon(), arm_compute::cpu::add_qsymm16_neon(), arm_compute::cpu::add_s16_u8_s16_neon(), arm_compute::cpu::add_same_neon(), arm_compute::cpu::add_u8_u8_s16_neon(), arm_compute::calculate_max_enlarged_window(), arm_compute::calculate_max_window(), arm_compute::calculate_max_window_horizontal(), Window::collapse_if_possible(), 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(), ClCopyKernel::configure(), CLStridedSliceKernel::configure(), ClFillKernel::configure(), GCFillBorderKernel::configure(), CLDequantizationLayerKernel::configure(), INEWarpKernel::configure(), CLHistogramKernel::configure(), NENormalizationLayerKernel::configure(), GCDepthConcatenateLayerKernel::configure(), NEBoundingBoxTransformKernel::configure(), NEHOGDetectorKernel::configure(), NEScaleKernel::configure(), CLLKTrackerInitKernel::configure(), CLQuantizationLayerKernel::configure(), NEROIPoolingLayerKernel::configure(), ClCropKernel::configure(), NEROIAlignLayerKernel::configure(), GCTensorShiftKernel::configure(), CLFillBorderKernel::configure(), NEFillBorderKernel::configure(), CLHOGDetectorKernel::configure(), CLLKTrackerFinalizeKernel::configure(), CLCropResize::configure(), CLHistogramBorderKernel::configure(), CLLKTrackerStage0Kernel::configure(), CLLKTrackerStage1Kernel::configure(), create_window(), arm_compute::cpu::elementwise_comp_quantized_signed(), arm_compute::cpu::elementwise_op(), arm_compute::cpu::elementwise_op_quantized(), arm_compute::cpu::elementwise_op_quantized_signed(), AssetsLibrary::fill_borders_with_garbage(), arm_compute::cpu::fp32_neon_activation(), IKernel::IKernel(), arm_compute::utils::load_trained_data(), arm_compute::cpu::nearest_neon_scale(), NEGatherKernel::NEGatherKernel(), arm_compute::cpu::neon_logits_1d_max(), IScheduler::num_threads_hint(), arm_compute::cpu::poolingMxN_fp32_neon_nhwc(), arm_compute::cpu::poolingMxN_q8_neon_nhwc(), arm_compute::cpu::qasymm8_neon_activation(), arm_compute::cpu::qasymm8_signed_neon_activation(), arm_compute::cpu::qsymm16_neon_activation(), CLMinMaxLayerKernel::reset(), NEMinMaxLayerKernel::reset(), GCGEMMMatrixAccumulateBiasesKernel::run(), GCGEMMTranspose1xWKernel::run(), GCDepthConcatenateLayerKernel::run(), CLHOGOrientationBinningKernel::run(), NETileKernel::run(), NEConvertQuantizedSignednessKernel::run(), NEDepthToSpaceLayerKernel::run(), GCPoolingLayerKernel::run(), NEFFTScaleKernel::run(), GCNormalizePlanarYUVLayerKernel::run(), CLSelectKernel::run(), CLDepthToSpaceLayerKernel::run(), CLSpaceToDepthLayerKernel::run(), CLDeconvolutionLayerUpsampleKernel::run(), CLMinMaxLayerKernel::run(), CLGEMMLowpQuantizeDownInt32ScaleByFixedPointKernel::run(), NEMinMaxLayerKernel::run(), CLInstanceNormalizationLayerKernel::run(), NEGEMMLowpMatrixMultiplyKernel::run(), NEFFTRadixStageKernel::run(), CLROIPoolingLayerKernel::run(), GCGEMMMatrixMultiplyKernel::run(), GCIm2ColKernel::run(), CLNormalizePlanarYUVLayerKernel::run(), GCBatchNormalizationLayerKernel::run(), CLPriorBoxLayerKernel::run(), CLChannelExtractKernel::run(), NEDepthConvertLayerKernel::run(), CLReductionOperationKernel::run(), NEBatchToSpaceLayerKernel::run(), CLL2NormalizeLayerKernel::run(), CLChannelCombineKernel::run(), CLGEMMLowpQuantizeDownInt32ScaleByFloatKernel::run(), CLGEMMLowpQuantizeDownInt32ScaleKernel::run(), CLLogits1DMaxShiftExpSumKernel::run(), CLArgMinMaxLayerKernel::run(), CLGEMMLowpMatrixMultiplyNativeKernel::run(), GCLogits1DNormKernel::run(), CLROIAlignLayerKernel::run(), CLBatchToSpaceLayerKernel::run(), NEGEMMTranspose1xWKernel::run(), CLGEMMLowpOffsetContributionKernel::run(), CLDepthwiseConvolutionLayer3x3NHWCKernel::run(), CLWinogradInputTransformKernel::run(), CLBatchNormalizationLayerKernel::run(), CLGEMMMatrixMultiplyKernel::run(), CLDirectConvolutionLayerKernel::run(), CLGEMMLowpMatrixMultiplyReshapedKernel::run(), CLColorConvertKernel::run(), CLGEMMMatrixMultiplyNativeKernel::run(), CLSpaceToBatchLayerKernel::run(), CLWinogradOutputTransformKernel::run(), CLDepthwiseConvolutionLayerNativeKernel::run(), CLGEMMLowpOffsetContributionOutputStageKernel::run(), CLIm2ColKernel::run(), CLGEMMLowpMatrixAReductionKernel::run(), CLGEMMLowpMatrixMultiplyReshapedOnlyRHSKernel::run(), CLLogits1DNormKernel::run(), CLGEMMMatrixMultiplyReshapedOnlyRHSKernel::run(), CLGEMMMatrixMultiplyReshapedKernel::run(), CLGEMMLowpMatrixBReductionKernel::run(), CpuFillKernel::run_op(), CpuCopyKernel::run_op(), CpuConcatenateHeightKernel::run_op(), CpuConcatenateWidthKernel::run_op(), CpuFloorKernel::run_op(), ClPoolingKernel::run_op(), CpuPoolingKernel::run_op(), ClPermuteKernel::run_op(), NEFillBorderKernel::run_op(), arm_compute::run_reverse(), arm_compute::utils::save_to_ppm(), Window::shift_dimensions(), arm_compute::test::validation::reference::softmax_layer_generic(), Window::split_window(), arm_compute::cpu::sub_qasymm8_neon(), arm_compute::cpu::sub_qasymm8_signed_neon(), arm_compute::cpu::sub_qsymm16_neon(), arm_compute::cpu::sub_same_neon(), arm_compute::cpu::sub_u8_u8_s16_neon(), AccessWindowTranspose::update_window_if_needed(), AccessWindowStatic::update_window_if_needed(), AccessWindowRectangle::update_window_if_needed(), NEThresholdKernel::validate(), NEQuantizationLayerKernel::validate(), NEFFTDigitReverseKernel::validate(), NEGEMMInterleave4x4Kernel::validate(), NEGEMMLowpMatrixAReductionKernel::validate(), and NEGEMMLowpMatrixBReductionKernel::validate().

50 {
52  _dims[dimension] = dim;
53 }
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
Definition: Error.h:466
static constexpr size_t num_max_dimensions
Number of dimensions the tensor has.
Definition: Dimensions.h:46

◆ set_broadcasted()

void set_broadcasted ( size_t  dimension)
inline

Set the dimension as broadcasted dimension.

Parameters
[in]dimensionThe dimension to set

Definition at line 55 of file Window.inl.

References ARM_COMPUTE_ERROR_ON, and Dimensions< int >::num_max_dimensions.

Referenced by Window::broadcast_if_dimension_le_one(), and Window::z().

56 {
58  set(dimension, Dimension(0, 0, 0));
59  _is_broadcasted[dimension] = true;
60 }
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
Definition: Error.h:466
static constexpr size_t num_max_dimensions
Number of dimensions the tensor has.
Definition: Dimensions.h:46

◆ set_dimension_step()

void set_dimension_step ( size_t  dimension,
int  step 
)
inline

Set the step of a given dimension.

Parameters
[in]dimensionDimension to update
[in]stepThe new dimension's step value

Definition at line 167 of file Window.inl.

References ARM_COMPUTE_ERROR_ON, and Dimensions< int >::num_max_dimensions.

Referenced by GCTransposeKernel::configure(), NEColorConvertKernel::configure(), GCIm2ColKernel::configure(), CLColorConvertKernel::configure(), GCDepthwiseConvolutionLayer3x3Kernel::run(), GCDirectConvolutionLayerKernel< kernel_size >::run(), CLQLSTMLayerNormalizationKernel::run(), CLMeanStdDevNormalizationKernel::run(), CLROIPoolingLayerKernel::run(), GCIm2ColKernel::run(), CLMeanStdDevKernel::run(), CLChannelCombineKernel::run(), NEGaussianPyramidVertKernel::run(), CLROIAlignLayerKernel::run(), CLDepthwiseConvolutionLayer3x3NCHWKernel::run(), CLDepthwiseConvolutionLayer3x3NHWCKernel::run(), CLDirectConvolutionLayerKernel::run(), CLHOGBlockNormalizationKernel::run(), CLIm2ColKernel::run(), NESeparableConvolutionVertKernel< matrix_size >::run(), and Window::z().

168 {
170  _dims[dimension].set_step(step);
171 }
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
Definition: Error.h:466
constexpr int step
Definition: fp32.cpp:35
static constexpr size_t num_max_dimensions
Number of dimensions the tensor has.
Definition: Dimensions.h:46

◆ shape()

TensorShape shape ( ) const
inline

Return the shape of the window in number of steps.

Definition at line 284 of file Window.inl.

References arm_compute::mlgo::parser::end(), Dimensions< size_t >::num_max_dimensions, TensorShape::set(), enable_tracing::start, and arm_compute::cpu::step.

Referenced by CLWinogradInputTransformKernel::run(), and Window::z().

285 {
286  TensorShape shape;
287  for(size_t d = 0; d < TensorShape::num_max_dimensions; ++d)
288  {
289  shape.set(d, (_dims[d].end() - _dims[d].start()) / _dims[d].step());
290  }
291  return shape;
292 }
void end(TokenStream &in, bool &valid)
Definition: MLGOParser.cpp:290
constexpr int step
Definition: fp32.cpp:35
TensorShape shape() const
Return the shape of the window in number of steps.
Definition: Window.inl:284
static constexpr size_t num_max_dimensions
Number of dimensions the tensor has.
Definition: Dimensions.h:46
TensorShape & set(size_t dimension, size_t value, bool apply_dim_correction=true, bool increase_dim_unit=true)
Accessor to set the value of one of the dimensions.
Definition: TensorShape.h:79

◆ shift()

void shift ( size_t  dimension,
int  shift_value 
)
inline

Shift the values of a given dimension by the given shift_value.

Parameters
[in]dimensionThe dimension to shift
[in]shift_valueValue to shift the start and end values of.

Definition at line 133 of file Window.inl.

References ARM_COMPUTE_ERROR_ON, Window::Dimension::end(), Dimensions< int >::num_max_dimensions, Window::Dimension::start(), and Window::Dimension::step().

Referenced by GCScaleKernel::run(), GCDepthwiseConvolutionLayer3x3Kernel::run(), NEGaussianPyramidHorKernel::run(), NEGaussian5x5HorKernel::run(), CLGaussianPyramidHorKernel::run(), GCActivationLayerKernel::run(), NESobel5x5HorKernel::run(), GCDirectConvolutionLayerKernel< kernel_size >::run(), GCPoolingLayerKernel::run(), GCArithmeticAdditionKernel::run(), GCNormalizePlanarYUVLayerKernel::run(), GCTensorShiftKernel::run(), GCBatchNormalizationLayerKernel::run(), NEGaussianPyramidVertKernel::run(), NESeparableConvolutionHorKernel< matrix_size >::run(), and Window::z().

134 {
136  Window::Dimension &d = _dims[dimension];
137  d = Window::Dimension(d.start() + shift_value, d.end() + shift_value, d.step());
138 }
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
Definition: Error.h:466
static constexpr size_t num_max_dimensions
Number of dimensions the tensor has.
Definition: Dimensions.h:46

◆ shift_dimensions()

Window shift_dimensions ( unsigned int  shift_value) const
inline

Shift down all the dimensions of a window.

i.e new_dims[n] = old_dims[n+shift_value].

Parameters
[in]shift_valueNumber of dimensions to shift the window by.
Returns
The window with the shifted dimensions.

Definition at line 101 of file Window.inl.

References Dimensions< int >::num_max_dimensions, and Window::set().

Referenced by CLMinMaxLayerKernel::run(), and Window::z().

102 {
103  Window shifted_window;
104  for(size_t n = 0; n < (Coordinates::num_max_dimensions - shift_value); n++)
105  {
106  shifted_window.set(n, _dims[n + shift_value]);
107  }
108  return shifted_window;
109 }
constexpr Window()
Default constructor: create a window containing a single element.
Definition: Window.h:52
static constexpr size_t num_max_dimensions
Number of dimensions the tensor has.
Definition: Dimensions.h:46

◆ slide_window_slice_1D()

bool slide_window_slice_1D ( Window slice) const
inline

Slide the passed 1D window slice.

If slice contains the last slice then it will remain unchanged and false will be returned.

Parameters
[in,out]sliceCurrent slice, to be updated to the next slice.
Returns
true if slice contains a new slice, false if slice already contained the last slice

Definition at line 311 of file Window.h.

References arm_compute::test::validation::reference::slice().

Referenced by GCWeightsReshapeKernel::run(), GCIm2ColKernel::run(), and CLWeightsReshapeKernel::run().

312  {
313  return slide_window_slice<1>(slice);
314  }
SimpleTensor< T > slice(const SimpleTensor< T > &src, Coordinates starts, Coordinates ends)

◆ slide_window_slice_2D()

bool slide_window_slice_2D ( Window slice) const
inline

Slide the passed 2D window slice.

If slice contains the last slice then it will remain unchanged and false will be returned.

Parameters
[in,out]sliceCurrent slice, to be updated to the next slice.
Returns
true if slice contains a new slice, false if slice already contained the last slice

Definition at line 323 of file Window.h.

References arm_compute::test::validation::reference::slice().

Referenced by ICLSimple2DKernel::run(), IGCSimple2DKernel::run(), GCTransposeKernel::run(), GCGEMMMatrixAccumulateBiasesKernel::run(), GCGEMMMatrixAdditionKernel::run(), GCAbsoluteDifferenceKernel::run(), GCGEMMTranspose1xWKernel::run(), CLBitwiseKernel::run(), CLGaussianPyramidHorKernel::run(), CLHistogramKernel::run(), CLMinMaxKernel::run(), CLGradientKernel::run(), CLAbsoluteDifferenceKernel::run(), CLRemapKernel::run(), CLHOGOrientationBinningKernel::run(), CLSobel3x3Kernel::run(), NEDepthToSpaceLayerKernel::run(), CLDerivativeKernel::run(), CLSobel5x5HorKernel::run(), CLSobel7x7HorKernel::run(), GCGEMMInterleave4x4Kernel::run(), CLQLSTMLayerNormalizationKernel::run(), CLScaleKernel::run(), CLMagnitudePhaseKernel::run(), CLIntegralImageVertKernel::run(), CLFastCornersKernel::run(), GCWeightsReshapeKernel::run(), CLMeanStdDevNormalizationKernel::run(), GCGEMMMatrixMultiplyKernel::run(), CLMeanStdDevKernel::run(), CLChannelExtractKernel::run(), CLScharr3x3Kernel::run(), CLHarrisScoreKernel::run(), CLReductionOperationKernel::run(), CLHOGDetectorKernel::run(), CLL2NormalizeLayerKernel::run(), CLChannelCombineKernel::run(), CLArgMinMaxLayerKernel::run(), CLGaussianPyramidVertKernel::run(), CLHistogramBorderKernel::run(), CLColorConvertKernel::run(), CLWeightsReshapeKernel::run(), CLHOGBlockNormalizationKernel::run(), CLEdgeNonMaxSuppressionKernel::run(), CLMinMaxLocationKernel::run(), CLIm2ColKernel::run(), CLGEMMLowpMatrixAReductionKernel::run(), CLCopyToArrayKernel::run(), CLSobel5x5VertKernel::run(), CLSobel7x7VertKernel::run(), CLEdgeTraceKernel::run(), CLGEMMLowpMatrixBReductionKernel::run(), and CLConvolutionRectangleKernel::run().

324  {
325  return slide_window_slice<2>(slice);
326  }
SimpleTensor< T > slice(const SimpleTensor< T > &src, Coordinates starts, Coordinates ends)

◆ slide_window_slice_3D()

bool slide_window_slice_3D ( Window slice) const
inline

Slide the passed 3D window slice.

If slice contains the last slice then it will remain unchanged and false will be returned.

Parameters
[in,out]sliceCurrent slice, to be updated to the next slice.
Returns
true if slice contains a new slice, false if slice already contained the last slice

Definition at line 335 of file Window.h.

References arm_compute::test::validation::reference::slice().

Referenced by ICLSimple3DKernel::run(), IGCSimple3DKernel::run(), GCScaleKernel::run(), GCDepthwiseConvolutionLayer3x3Kernel::run(), GCPixelWiseMultiplicationKernel::run(), GCNormalizationLayerKernel::run(), GCActivationLayerKernel::run(), GCDepthConcatenateLayerKernel::run(), GCDropoutLayerKernel::run(), GCLogits1DShiftExpSumKernel::run(), GCDirectConvolutionLayerKernel< kernel_size >::run(), GCFillBorderKernel::run(), NEDepthToSpaceLayerKernel::run(), NESpaceToDepthLayerKernel::run(), GCPoolingLayerKernel::run(), GCArithmeticAdditionKernel::run(), GCNormalizePlanarYUVLayerKernel::run(), GCTensorShiftKernel::run(), CLDepthToSpaceLayerKernel::run(), CLSelectKernel::run(), CLSpaceToDepthLayerKernel::run(), CLDeconvolutionLayerUpsampleKernel::run(), CLFFTScaleKernel::run(), CLMaxUnpoolingLayerKernel::run(), CLQuantizationLayerKernel::run(), CLNormalizationLayerKernel::run(), CLComparisonKernel::run(), CLMinMaxLayerKernel::run(), CLFFTDigitReverseKernel::run(), CLGEMMLowpQuantizeDownInt32ScaleByFixedPointKernel::run(), CLReorgLayerKernel::run(), GCCol2ImKernel::run(), GCIm2ColKernel::run(), CLNormalizePlanarYUVLayerKernel::run(), CLPadLayerKernel::run(), GCBatchNormalizationLayerKernel::run(), CLReductionOperationKernel::run(), NEBatchToSpaceLayerKernel::run(), CLFFTRadixStageKernel::run(), CLFillBorderKernel::run(), CLL2NormalizeLayerKernel::run(), CLGEMMLowpQuantizeDownInt32ScaleKernel::run(), CLLogits1DMaxShiftExpSumKernel::run(), CLArgMinMaxLayerKernel::run(), CLGEMMLowpMatrixMultiplyNativeKernel::run(), NESpaceToBatchLayerKernel::run(), CLGEMMReshapeLHSMatrixKernel::run(), CLCol2ImKernel::run(), GCLogits1DNormKernel::run(), CLBatchToSpaceLayerKernel::run(), CLDepthwiseConvolutionLayer3x3NCHWKernel::run(), CLGEMMLowpOffsetContributionKernel::run(), CLWinogradInputTransformKernel::run(), CLBatchNormalizationLayerKernel::run(), CLGEMMMatrixMultiplyKernel::run(), CLGEMMLowpMatrixMultiplyReshapedKernel::run(), CLDirectConvolutionLayerKernel::run(), CLGEMMMatrixMultiplyNativeKernel::run(), CLSpaceToBatchLayerKernel::run(), CLWinogradOutputTransformKernel::run(), CLGEMMLowpOffsetContributionOutputStageKernel::run(), CLIm2ColKernel::run(), CLGEMMReshapeRHSMatrixKernel::run(), CLGEMMLowpMatrixMultiplyReshapedOnlyRHSKernel::run(), CLLogits1DNormKernel::run(), CLGEMMMatrixMultiplyReshapedOnlyRHSKernel::run(), ClElementwiseKernel::run_op(), ClCopyKernel::run_op(), ClElementWiseUnaryKernel::run_op(), ClActivationKernel::run_op(), ClDepthConcatenateKernel::run_op(), ClBatchConcatenateKernel::run_op(), CLFillBorderKernel::run_op(), CLPixelWiseMultiplicationKernel::run_op(), and CLComplexPixelWiseMultiplicationKernel::run_op().

336  {
337  return slide_window_slice<3>(slice);
338  }
SimpleTensor< T > slice(const SimpleTensor< T > &src, Coordinates starts, Coordinates ends)

◆ slide_window_slice_4D()

bool slide_window_slice_4D ( Window slice) const
inline

Slide the passed 4D window slice.

If slice contains the last slice then it will remain unchanged and false will be returned.

Parameters
[in,out]sliceCurrent slice, to be updated to the next slice.
Returns
true if slice contains a new slice, false if slice already contained the last slice

Definition at line 347 of file Window.h.

References Window::collapse_if_possible(), and arm_compute::test::validation::reference::slice().

Referenced by CLReverseKernel::run(), CLTileKernel::run(), GCWeightsReshapeKernel::run(), CLReductionOperationKernel::run(), CLArgMinMaxLayerKernel::run(), CLCol2ImKernel::run(), CLDepthwiseConvolutionLayer3x3NHWCKernel::run(), CLWeightsReshapeKernel::run(), CLDepthwiseConvolutionLayerNativeKernel::run(), ClWidthConcatenate2TensorsKernel::run_op(), ClPoolingKernel::run_op(), ClWidthConcatenate4TensorsKernel::run_op(), and ClPermuteKernel::run_op().

348  {
349  return slide_window_slice<4>(slice);
350  }
SimpleTensor< T > slice(const SimpleTensor< T > &src, Coordinates starts, Coordinates ends)

◆ split_window()

Window split_window ( size_t  dimension,
size_t  id,
size_t  total 
) const
inline

Split a window into a set of sub windows along a given dimension.

For example to split a window into 3 sub-windows along the Y axis, you would have to do:
Window sub0 = window.split_window( 1, 0, 3);
Window sub1 = window.split_window( 1, 1, 3);
Window sub2 = window.split_window( 1, 2, 3);

Parameters
[in]dimensionDimension along which the split will be performed
[in]idId of the sub-window to return. Must be in the range (0, total-1)
[in]totalTotal number of sub-windows the window will be split into.
Returns
The subwindow "id" out of "total"

Definition at line 189 of file Window.inl.

References ARM_COMPUTE_ERROR_ON, arm_compute::mlgo::parser::end(), Window::num_iterations(), Dimensions< int >::num_max_dimensions, Window::set(), arm_compute::test::validation::reference::slice(), enable_tracing::start, and arm_compute::cpu::step.

Referenced by IScheduler::num_threads_hint(), OMPScheduler::schedule_op(), and Window::z().

190 {
191  ARM_COMPUTE_ERROR_ON(id >= total);
193 
194  Window out;
195 
196  for(size_t d = 0; d < Coordinates::num_max_dimensions; ++d)
197  {
198  if(d == dimension)
199  {
200  int start = _dims[d].start();
201  int end = _dims[d].end();
202  const int step = _dims[d].step();
203 
204  const int num_it = num_iterations(d);
205  const int rem = num_it % total;
206  int work = num_it / total;
207 
208  int it_start = work * id;
209 
210  if(int(id) < rem)
211  {
212  ++work;
213  it_start += id;
214  }
215  else
216  {
217  it_start += rem;
218  }
219 
220  start += it_start * step;
221  end = std::min(end, start + work * step);
222 
223  out.set(d, Dimension(start, end, step));
224  }
225  else
226  {
227  out.set(d, _dims[d]);
228  }
229  }
230 
231  return out;
232 }
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
Definition: Error.h:466
constexpr size_t num_iterations(size_t dimension) const
Return the number of iterations needed to iterate through a given dimension.
Definition: Window.inl:182
constexpr Window()
Default constructor: create a window containing a single element.
Definition: Window.h:52
void end(TokenStream &in, bool &valid)
Definition: MLGOParser.cpp:290
constexpr int step
Definition: fp32.cpp:35
static constexpr size_t num_max_dimensions
Number of dimensions the tensor has.
Definition: Dimensions.h:46

◆ use_tensor_dimensions()

void use_tensor_dimensions ( const TensorShape shape,
size_t  first_dimension = Window::DimX 
)
inline

Use the tensor's dimensions to fill the window dimensions.

Parameters
[in]shapeTensorShape to copy the dimensions from.
[in]first_dimensionOnly copy dimensions which are greater or equal to this value.

Definition at line 276 of file Window.inl.

References Dimensions< T >::num_dimensions().

Referenced by arm_compute::utils::compare_tensor(), GCTensorShiftKernel::configure(), CLFillBorderKernel::configure(), NEFillBorderKernel::configure(), ITensor::copy_from(), AssetsLibrary::fill_layer_data(), NPYLoader::fill_tensor(), arm_compute::utils::fill_tensor_vector(), arm_compute::test::validation::reference::gather(), CpuFloorKernel::infer_window(), CaffePreproccessor::preprocess(), TFPreproccessor::preprocess(), CLMinMaxLayerKernel::reset(), NEMinMaxLayerKernel::reset(), GCDepthwiseConvolutionLayer3x3Kernel::run(), GCDirectConvolutionLayerKernel< kernel_size >::run(), CLQLSTMLayerNormalizationKernel::run(), NEMinMaxLayerKernel::run(), GCWeightsReshapeKernel::run(), GCIm2ColKernel::run(), NEStackLayerKernel::run(), CLStackLayerKernel::run(), CLCol2ImKernel::run(), CLDepthwiseConvolutionLayer3x3NCHWKernel::run(), CLDepthwiseConvolutionLayer3x3NHWCKernel::run(), CLWinogradFilterTransformKernel::run(), CLDirectConvolutionLayerKernel::run(), CLWeightsReshapeKernel::run(), CLWinogradOutputTransformKernel::run(), CLIm2ColKernel::run(), arm_compute::test::validation::reference::slice(), arm_compute::test::validation::reference::softmax_layer_generic(), arm_compute::test::validation::reference::strided_slice(), arm_compute::test::validation::TEST_CASE(), and Window::z().

277 {
278  for(unsigned int n = first_dimension; n < shape.num_dimensions(); ++n)
279  {
280  set(n, Window::Dimension(0, std::max(shape[n], static_cast<size_t>(1))));
281  }
282 }
unsigned int num_dimensions() const
Returns the effective dimensionality of the tensor.
Definition: Dimensions.h:143
TensorShape shape() const
Return the shape of the window in number of steps.
Definition: Window.inl:284

◆ validate()

void validate ( ) const
inline

Will validate all the window's dimensions' values when asserts are enabled.

No-op when asserts are disabled

Definition at line 173 of file Window.inl.

References ARM_COMPUTE_ERROR_ON, arm_compute::mlgo::parser::end(), Dimensions< int >::num_max_dimensions, enable_tracing::start, and arm_compute::cpu::step.

Referenced by 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_rgb_to_yuv4(), arm_compute::colorconvert_yuyv_to_iyuv(), arm_compute::colorconvert_yuyv_to_nv12(), arm_compute::error_on_invalid_subwindow(), arm_compute::error_on_mismatching_windows(), arm_compute::error_on_window_not_collapsable_at_dimension(), arm_compute::execute_window_loop(), IScheduler::num_threads_hint(), OMPScheduler::schedule_op(), AccessWindowTranspose::update_window_if_needed(), AccessWindowRectangle::update_window_if_needed(), and Window::z().

174 {
175  for(size_t i = 0; i < Coordinates::num_max_dimensions; ++i)
176  {
177  ARM_COMPUTE_ERROR_ON(_dims[i].end() < _dims[i].start());
178  ARM_COMPUTE_ERROR_ON((_dims[i].step() != 0) && (((_dims[i].end() - _dims[i].start()) % _dims[i].step()) != 0));
179  }
180 }
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
Definition: Error.h:466
void end(TokenStream &in, bool &valid)
Definition: MLGOParser.cpp:290
constexpr int step
Definition: fp32.cpp:35
static constexpr size_t num_max_dimensions
Number of dimensions the tensor has.
Definition: Dimensions.h:46

◆ x()

constexpr const Dimension& x ( ) const
inline

Alias to access the first dimension of the window.

Returns
First dimension of the window

Definition at line 145 of file Window.h.

References Window::DimX.

Referenced by arm_compute::cpu::add_qasymm8_neon(), arm_compute::cpu::add_qasymm8_signed_neon(), arm_compute::cpu::add_qsymm16_neon(), arm_compute::cpu::add_s16_u8_s16_neon(), arm_compute::cpu::add_same_neon(), arm_compute::cpu::add_u8_u8_s16_neon(), 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(), ClCopyKernel::configure(), CLStridedSliceKernel::configure(), ClFillKernel::configure(), INEWarpKernel::configure(), GCGEMMTranspose1xWKernel::configure(), NENormalizationLayerKernel::configure(), NEScaleKernel::configure(), ClCropKernel::configure(), arm_compute::cpu::elementwise_comp_quantized_signed(), arm_compute::cpu::elementwise_op(), arm_compute::cpu::elementwise_op_quantized(), arm_compute::cpu::elementwise_op_quantized_signed(), arm_compute::enqueue(), arm_compute::error_on_unconfigured_kernel(), arm_compute::finalize_quantization(), arm_compute::cpu::fp32_neon_activation(), ICLKernel::gws_from_window(), arm_compute::cpu::nearest_neon_scale(), arm_compute::cpu::neon_logits_1d_max(), arm_compute::cpu::poolingMxN_fp32_neon_nhwc(), arm_compute::cpu::poolingMxN_q8_neon_nhwc(), arm_compute::cpu::qasymm8_neon_activation(), arm_compute::cpu::qasymm8_signed_neon_activation(), arm_compute::cpu::qsymm16_neon_activation(), GCDepthwiseConvolutionLayer3x3Kernel::run(), NEGaussianPyramidHorKernel::run(), GCGEMMTranspose1xWKernel::run(), NEHOGOrientationBinningKernel::run(), CLHistogramKernel::run(), GCDirectConvolutionLayerKernel< kernel_size >::run(), NETileKernel::run(), NEConvertQuantizedSignednessKernel::run(), CLHOGOrientationBinningKernel::run(), NEROIPoolingLayerKernel::run(), NESpaceToDepthLayerKernel::run(), NEDepthToSpaceLayerKernel::run(), GCPoolingLayerKernel::run(), NEMinMaxLayerKernel::run(), NEGEMMLowpMatrixMultiplyKernel::run(), CLChannelExtractKernel::run(), NEDepthConvertLayerKernel::run(), CLReductionOperationKernel::run(), NEROIAlignLayerKernel::run(), NEBatchToSpaceLayerKernel::run(), CLChannelCombineKernel::run(), NESpaceToBatchLayerKernel::run(), NEGaussianPyramidVertKernel::run(), CLHistogramBorderKernel::run(), CLGaussianPyramidVertKernel::run(), CLDepthwiseConvolutionLayer3x3NCHWKernel::run(), CLDepthwiseConvolutionLayer3x3NHWCKernel::run(), CLColorConvertKernel::run(), CLDepthwiseConvolutionLayerNativeKernel::run(), NEWinogradLayerTransformInputKernel< T, OutputTileRows, OutputTileCols, KernelRows, KernelCols >::run(), NEWinogradLayerTransformOutputKernel< T, OutputTileRows, OutputTileCols, KernelRows, KernelCols >::run(), NEWinogradLayerTransformWeightsKernel< T, OutputTileRows, OutputTileCols, KernelRows, KernelCols >::run(), CpuFillKernel::run_op(), CpuCopyKernel::run_op(), CpuConcatenateHeightKernel::run_op(), CpuConcatenateWidthKernel::run_op(), CpuFloorKernel::run_op(), ClPoolingKernel::run_op(), CpuPoolingKernel::run_op(), ClCropKernel::run_op(), arm_compute::run_reverse(), arm_compute::cpu::sub_qasymm8_neon(), arm_compute::cpu::sub_qasymm8_signed_neon(), arm_compute::cpu::sub_qsymm16_neon(), arm_compute::cpu::sub_same_neon(), arm_compute::cpu::sub_u8_u8_s16_neon(), AccessWindowTranspose::update_padding_if_needed(), AccessWindowRectangle::update_padding_if_needed(), AccessWindowTranspose::update_window_if_needed(), AccessWindowRectangle::update_window_if_needed(), ClFillKernel::validate(), NEThresholdKernel::validate(), NEQuantizationLayerKernel::validate(), ClCropKernel::validate(), and NEGEMMInterleave4x4Kernel::validate().

146  {
147  return _dims.at(Window::DimX);
148  }
static constexpr size_t DimX
Alias for dimension 0 also known as X dimension.
Definition: Window.h:43

◆ y()

constexpr const Dimension& y ( ) const
inline

Alias to access the second dimension of the window.

Returns
Second dimension of the window

Definition at line 154 of file Window.h.

References Window::DimY.

Referenced by 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(), INEWarpKernel::configure(), NEScaleKernel::configure(), arm_compute::enqueue(), ICLKernel::gws_from_window(), arm_compute::cpu::poolingMxN_fp32_neon_nhwc(), arm_compute::cpu::poolingMxN_q8_neon_nhwc(), GCDepthwiseConvolutionLayer3x3Kernel::run(), GCGEMMTranspose1xWKernel::run(), NEHOGOrientationBinningKernel::run(), GCDirectConvolutionLayerKernel< kernel_size >::run(), CLHOGOrientationBinningKernel::run(), NEDepthToSpaceLayerKernel::run(), GCPoolingLayerKernel::run(), NEGEMMLowpMatrixMultiplyKernel::run(), CLChannelExtractKernel::run(), CLChannelCombineKernel::run(), NESpaceToBatchLayerKernel::run(), NEGaussianPyramidVertKernel::run(), CLGaussianPyramidVertKernel::run(), CLDepthwiseConvolutionLayer3x3NCHWKernel::run(), CLColorConvertKernel::run(), ClPoolingKernel::run_op(), CpuPoolingKernel::run_op(), AccessWindowTranspose::update_padding_if_needed(), AccessWindowRectangle::update_padding_if_needed(), AccessWindowTranspose::update_window_if_needed(), AccessWindowRectangle::update_window_if_needed(), and NEComputeAllAnchorsKernel::validate().

155  {
156  return _dims.at(Window::DimY);
157  }
static constexpr size_t DimY
Alias for dimension 1 also known as Y dimension.
Definition: Window.h:45

◆ z()

Friends And Related Function Documentation

◆ swap

void swap ( Window lhs,
Window rhs 
)
friend

Friend function that swaps the contents of two windows.

Parameters
[in]lhsFirst window to swap.
[in]rhsSecond window to swap.

Definition at line 304 of file Window.inl.

Referenced by Window::broadcast_if_dimension_le_one(), and Window::operator=().

305 {
306  lhs._dims.swap(rhs._dims);
307 }

Field Documentation

◆ DimW

constexpr size_t DimW = 3
static

Alias for dimension 3 also known as W dimension.

Definition at line 49 of file Window.h.

◆ DimX

constexpr size_t DimX = 0
static

Alias for dimension 0 also known as X dimension.

Definition at line 43 of file Window.h.

Referenced by arm_compute::cpu::add_qasymm8_neon(), arm_compute::cpu::add_qasymm8_signed_neon(), arm_compute::cpu::add_qsymm16_neon(), arm_compute::cpu::add_s16_u8_s16_neon(), arm_compute::cpu::add_same_neon(), arm_compute::cpu::add_u8_u8_s16_neon(), 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(), arm_compute::misc::shape_calculator::compute_min_max_shape(), arm_compute::misc::shape_calculator::compute_reductionB_shape(), arm_compute::misc::shape_calculator::compute_winograd_filter_transform_shape(), arm_compute::test::validation::reference::concatenate_layer(), GCTransposeKernel::configure(), ClCopyKernel::configure(), ClElementWiseUnaryKernel::configure(), CLStridedSliceKernel::configure(), ClFillKernel::configure(), CpuConcatenate::configure(), GCFillBorderKernel::configure(), CLDequantizationLayerKernel::configure(), INEWarpKernel::configure(), ClConcatenate::configure(), NEHOGOrientationBinningKernel::configure(), NENormalizationLayerKernel::configure(), GCDepthConcatenateLayerKernel::configure(), NEBoundingBoxTransformKernel::configure(), NEHOGDetectorKernel::configure(), NEScaleKernel::configure(), CLTileKernel::configure(), CLHOGOrientationBinningKernel::configure(), CLLKTrackerInitKernel::configure(), CLQuantizationLayerKernel::configure(), NEROIPoolingLayerKernel::configure(), ClCropKernel::configure(), NEROIAlignLayerKernel::configure(), GCTensorShiftKernel::configure(), NEHOGDescriptor::configure(), CLFillBorderKernel::configure(), NEFillBorderKernel::configure(), CLROIPoolingLayerKernel::configure(), CLHOGDescriptor::configure(), CLHOGDetectorKernel::configure(), CLLKTrackerFinalizeKernel::configure(), NEHOGMultiDetection::configure(), NELSTMLayer::configure(), NELSTMLayerQuantized::configure(), CLHOGMultiDetection::configure(), CLLSTMLayerQuantized::configure(), CLLKTrackerStage0Kernel::configure(), CLLSTMLayer::configure(), NEWinogradLayerTransformInputKernel< T, OutputTileRows, OutputTileCols, KernelRows, KernelCols >::configure(), CLLKTrackerStage1Kernel::configure(), NEWinogradLayerTransformOutputKernel< T, OutputTileRows, OutputTileCols, KernelRows, KernelCols >::configure(), arm_compute::cpu::elementwise_comp_quantized_signed(), arm_compute::cpu::elementwise_op(), arm_compute::cpu::elementwise_op_quantized(), arm_compute::cpu::elementwise_op_quantized_signed(), arm_compute::finalize_quantization(), arm_compute::cpu::fp32_neon_activation(), NEWinogradLayerTransformWeightsKernel< T, OutputTileRows, OutputTileCols, KernelRows, KernelCols >::get_matrix_stride(), IKernel::IKernel(), NEDepthwiseConvolutionAssemblyDispatch::is_optimized_supported(), arm_compute::utils::load_trained_data(), arm_compute::cpu::nearest_neon_scale(), NEGatherKernel::NEGatherKernel(), arm_compute::cpu::neon_logits_1d_max(), IScheduler::num_threads_hint(), arm_compute::cpu::poolingMxN_fp32_neon_nhwc(), arm_compute::cpu::poolingMxN_q8_neon_nhwc(), NEWinogradConvolutionLayer::prepare(), NEGEMMLowpMatrixMultiplyCore::prepare(), arm_compute::cpu::qasymm8_neon_activation(), arm_compute::cpu::qasymm8_signed_neon_activation(), arm_compute::cpu::qsymm16_neon_activation(), CLMinMaxLayerKernel::reset(), NEMinMaxLayerKernel::reset(), GCScaleKernel::run(), GCDepthwiseConvolutionLayer3x3Kernel::run(), NEGaussianPyramidHorKernel::run(), NEGaussian5x5HorKernel::run(), GCGEMMTranspose1xWKernel::run(), CLGaussianPyramidHorKernel::run(), CPPUpsampleKernel::run(), NEHOGOrientationBinningKernel::run(), GCActivationLayerKernel::run(), NESobel5x5HorKernel::run(), GCDirectConvolutionLayerKernel< kernel_size >::run(), NEConvertQuantizedSignednessKernel::run(), CLHOGOrientationBinningKernel::run(), NETileKernel::run(), NEDepthToSpaceLayerKernel::run(), NEROIPoolingLayerKernel::run(), GCGEMMInterleave4x4Kernel::run(), GCPoolingLayerKernel::run(), NEFFTScaleKernel::run(), GCArithmeticAdditionKernel::run(), NEROIPoolingLayer::run(), GCNormalizePlanarYUVLayerKernel::run(), CLSelectKernel::run(), GCTensorShiftKernel::run(), CLSpaceToDepthLayerKernel::run(), CLDepthToSpaceLayerKernel::run(), ClConcatenate::run(), CLDeconvolutionLayerUpsampleKernel::run(), NERange::run(), CLComputeAllAnchorsKernel::run(), CLQLSTMLayerNormalizationKernel::run(), CpuPoolingAssemblyDispatch::run(), CLMinMaxLayerKernel::run(), NEMinMaxLayerKernel::run(), CLInstanceNormalizationLayerKernel::run(), CLMeanStdDevNormalizationKernel::run(), NEGEMMLowpMatrixMultiplyKernel::run(), CLROIPoolingLayerKernel::run(), NEFFT1D::run(), GCGEMMMatrixMultiplyKernel::run(), GCIm2ColKernel::run(), NEWinogradConvolutionLayer::run(), CLNormalizePlanarYUVLayerKernel::run(), CLChannelExtractKernel::run(), GCBatchNormalizationLayerKernel::run(), NEDepthConvertLayerKernel::run(), CLReductionOperationKernel::run(), CpuPooling::run(), NEBatchToSpaceLayerKernel::run(), CLL2NormalizeLayerKernel::run(), CLChannelCombineKernel::run(), NEOpticalFlow::run(), CLLogits1DMaxShiftExpSumKernel::run(), CLGEMMLowpMatrixMultiplyNativeKernel::run(), CLArgMinMaxLayerKernel::run(), NEGaussianPyramidVertKernel::run(), CLROIAlignLayerKernel::run(), GCLogits1DNormKernel::run(), CLBatchToSpaceLayerKernel::run(), NEGEMMTranspose1xWKernel::run(), CLDepthwiseConvolutionLayer3x3NCHWKernel::run(), CLGEMMLowpOffsetContributionKernel::run(), CLDepthwiseConvolutionLayer3x3NHWCKernel::run(), CLBatchNormalizationLayerKernel::run(), NEGEMM::run(), CLGEMMMatrixMultiplyKernel::run(), CLGEMMLowpMatrixMultiplyReshapedKernel::run(), CLDirectConvolutionLayerKernel::run(), CLGEMMMatrixMultiplyNativeKernel::run(), CLColorConvertKernel::run(), NEGEMMLowpMatrixMultiplyCore::run(), CLSpaceToBatchLayerKernel::run(), CLHOGBlockNormalizationKernel::run(), CLWinogradOutputTransformKernel::run(), CLDepthwiseConvolutionLayerNativeKernel::run(), CLGEMMLowpOffsetContributionOutputStageKernel::run(), CLIm2ColKernel::run(), NEHOGBlockNormalizationKernel::run(), CLGEMMLowpMatrixAReductionKernel::run(), CLGEMMLowpMatrixMultiplyReshapedOnlyRHSKernel::run(), NESeparableConvolutionHorKernel< matrix_size >::run(), CLLogits1DNormKernel::run(), CLGEMMMatrixMultiplyReshapedOnlyRHSKernel::run(), CLGEMMMatrixMultiplyReshapedKernel::run(), NESeparableConvolutionVertKernel< matrix_size >::run(), CpuFillKernel::run_op(), CpuCopyKernel::run_op(), CpuConcatenateWidthKernel::run_op(), CpuConcatenateHeightKernel::run_op(), CpuFloorKernel::run_op(), ClPoolingKernel::run_op(), CpuPoolingKernel::run_op(), ClPermuteKernel::run_op(), ClCropKernel::run_op(), arm_compute::run_reverse(), arm_compute::utils::save_to_ppm(), arm_compute::cpu::sub_qasymm8_neon(), arm_compute::cpu::sub_qasymm8_signed_neon(), arm_compute::cpu::sub_qsymm16_neon(), arm_compute::cpu::sub_same_neon(), arm_compute::cpu::sub_u8_u8_s16_neon(), NEThresholdKernel::validate(), CpuConcatenate::validate(), NEQuantizationLayerKernel::validate(), NEFFTDigitReverseKernel::validate(), ClConcatenate::validate(), NEGEMMInterleave4x4Kernel::validate(), NEDeconvolutionLayer::validate(), NEGEMMLowpMatrixAReductionKernel::validate(), NELSTMLayerQuantized::validate(), NELSTMLayer::validate(), CLLSTMLayerQuantized::validate(), NEGEMMLowpMatrixBReductionKernel::validate(), CLLSTMLayer::validate(), Window::x(), and Window::z().

◆ DimY

constexpr size_t DimY = 1
static

Alias for dimension 1 also known as Y dimension.

Definition at line 45 of file Window.h.

Referenced by 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(), arm_compute::misc::shape_calculator::compute_winograd_filter_transform_shape(), arm_compute::test::validation::reference::concatenate_layer(), GCTransposeKernel::configure(), CpuConcatenate::configure(), GCFillBorderKernel::configure(), INEWarpKernel::configure(), ClConcatenate::configure(), NEHOGOrientationBinningKernel::configure(), GCDepthConcatenateLayerKernel::configure(), NEBoundingBoxTransformKernel::configure(), NEHOGDetectorKernel::configure(), NEScaleKernel::configure(), CLLKTrackerInitKernel::configure(), CLHOGOrientationBinningKernel::configure(), NEColorConvertKernel::configure(), NEROIPoolingLayerKernel::configure(), NEROIAlignLayerKernel::configure(), GCTensorShiftKernel::configure(), NEHOGDescriptor::configure(), CLIntegralImageVertKernel::configure(), CLFillBorderKernel::configure(), NEFillBorderKernel::configure(), CLROIPoolingLayerKernel::configure(), CLHOGDescriptor::configure(), CLColorConvertKernel::configure(), CLHOGDetectorKernel::configure(), NEDirectConvolutionLayer::configure(), CLLKTrackerFinalizeKernel::configure(), NEHOGMultiDetection::configure(), NELSTMLayerQuantized::configure(), CLHOGMultiDetection::configure(), CLLSTMLayerQuantized::configure(), CLLKTrackerStage0Kernel::configure(), CLLKTrackerStage1Kernel::configure(), ITensor::copy_from(), arm_compute::utils::draw_detection_rectangle(), IKernel::IKernel(), NEDepthwiseConvolutionAssemblyDispatch::is_optimized_supported(), IScheduler::num_threads_hint(), NEGEMM::prepare(), NEGEMMLowpMatrixMultiplyCore::prepare(), NEQLSTMLayer::prepare(), ICPPSimpleFunction::run(), INESimpleFunction::run(), GCGEMMMatrixAccumulateBiasesKernel::run(), INESimpleFunctionNoBorder::run(), INEOperator::run(), GCDepthwiseConvolutionLayer3x3Kernel::run(), GCGEMMTranspose1xWKernel::run(), CPPUpsampleKernel::run(), NEHOGOrientationBinningKernel::run(), NELogicalAnd::run(), NEMeanStdDev::run(), NEHistogram::run(), NEHOGDetectorKernel::run(), GCDirectConvolutionLayerKernel< kernel_size >::run(), CLHOGOrientationBinningKernel::run(), NEDepthToSpaceLayerKernel::run(), NEROIPoolingLayerKernel::run(), GCGEMMInterleave4x4Kernel::run(), GCPoolingLayerKernel::run(), CpuConcatenate::run(), NEEqualizeHistogram::run(), NESpaceToDepthLayer::run(), NEDerivative::run(), CLDepthToSpaceLayerKernel::run(), CLSpaceToDepthLayerKernel::run(), NEHOGDescriptor::run(), CLDeconvolutionLayerUpsampleKernel::run(), NEGaussian5x5::run(), NEHOGGradient::run(), NEMinMaxLocation::run(), CpuPoolingAssemblyDispatch::run(), CLMinMaxLayerKernel::run(), CLGEMMLowpQuantizeDownInt32ScaleByFixedPointKernel::run(), NESobel7x7::run(), NESobel5x5::run(), CLInstanceNormalizationLayerKernel::run(), NEL2NormalizeLayer::run(), NEMaxUnpoolingLayer::run(), NEFFT1D::run(), NEFastCorners::run(), NEGEMMLowpMatrixMultiplyKernel::run(), NEStackLayer::run(), NENormalizationLayer::run(), GCGEMMMatrixMultiplyKernel::run(), GCIm2ColKernel::run(), CLMeanStdDevKernel::run(), CLChannelExtractKernel::run(), CLPriorBoxLayerKernel::run(), CpuSoftmaxGeneric< IS_LOG >::run(), CLReductionOperationKernel::run(), NECannyEdge::run(), CPPBoxWithNonMaximaSuppressionLimit::run(), CpuPooling::run(), NEBatchToSpaceLayerKernel::run(), CLL2NormalizeLayerKernel::run(), CLChannelCombineKernel::run(), CLGEMMLowpQuantizeDownInt32ScaleByFloatKernel::run(), CLGEMMLowpQuantizeDownInt32ScaleKernel::run(), NEFuseBatchNormalization::run(), CLArgMinMaxLayerKernel::run(), CLGEMMLowpMatrixMultiplyNativeKernel::run(), NEBatchNormalizationLayer::run(), NEGaussianPyramidVertKernel::run(), NEHOGMultiDetection::run(), NEHarrisCorners::run(), NESpaceToBatchLayer::run(), NELogicalOr::run(), CLBatchToSpaceLayerKernel::run(), CLGaussianPyramidVertKernel::run(), NEGEMMTranspose1xWKernel::run(), CLDepthwiseConvolutionLayer3x3NCHWKernel::run(), CLGEMMLowpOffsetContributionKernel::run(), NEGEMM::run(), CLGEMMMatrixMultiplyKernel::run(), NEDirectConvolutionLayer::run(), CLHarrisCorners::run(), NEGaussianPyramidHalf::run(), NEGenerateProposalsLayer::run(), CLDirectConvolutionLayerKernel::run(), CLGEMMLowpMatrixMultiplyReshapedKernel::run(), CLGEMMMatrixMultiplyNativeKernel::run(), CLColorConvertKernel::run(), NEGEMMLowpMatrixMultiplyCore::run(), CLSpaceToBatchLayerKernel::run(), CLHOGBlockNormalizationKernel::run(), CLWinogradOutputTransformKernel::run(), CLHOGMultiDetection::run(), NEConvolutionSquare< matrix_size >::run(), CLGEMMLowpOffsetContributionOutputStageKernel::run(), CLIm2ColKernel::run(), NEHOGBlockNormalizationKernel::run(), CLGEMMLowpMatrixAReductionKernel::run(), NELogicalNot::run(), CLGEMMLowpMatrixMultiplyReshapedOnlyRHSKernel::run(), CLGEMMMatrixMultiplyReshapedOnlyRHSKernel::run(), CLGEMMMatrixMultiplyReshapedKernel::run(), CLGEMMLowpMatrixBReductionKernel::run(), NEQLSTMLayer::run(), NEGEMMConvolutionLayer::run(), CpuConcatenateHeightKernel::run_op(), ClPoolingKernel::run_op(), CpuPoolingKernel::run_op(), ClPermuteKernel::run_op(), NEFillBorderKernel::run_op(), arm_compute::utils::save_to_ppm(), CpuConcatenate::validate(), ClConcatenate::validate(), NEGEMMInterleave4x4Kernel::validate(), NEDeconvolutionLayer::validate(), NEGEMMLowpMatrixAReductionKernel::validate(), NELSTMLayerQuantized::validate(), CLLSTMLayerQuantized::validate(), NEGEMMLowpMatrixBReductionKernel::validate(), and Window::y().

◆ DimZ

constexpr size_t DimZ = 2
static

Alias for dimension 2 also known as Z dimension.

Definition at line 47 of file Window.h.

Referenced by arm_compute::cpu::bilinear_neon_scale(), arm_compute::misc::shape_calculator::compute_winograd_filter_transform_shape(), arm_compute::test::validation::reference::concatenate_layer(), ClWidthConcatenate2TensorsKernel::configure(), ClHeightConcatenateKernel::configure(), ClWidthConcatenateKernel::configure(), ClWidthConcatenate4TensorsKernel::configure(), ClDepthConcatenateKernel::configure(), CpuConcatenate::configure(), GCFillBorderKernel::configure(), GCConcatenateLayer::configure(), ClConcatenate::configure(), GCDepthConcatenateLayerKernel::configure(), NEScaleKernel::configure(), GCTensorShiftKernel::configure(), CLFillBorderKernel::configure(), CLDepthConvertLayerKernel::configure(), NEFillBorderKernel::configure(), CLROIPoolingLayerKernel::configure(), GCIm2ColKernel::configure(), NEDirectConvolutionLayer::configure(), arm_compute::cpu::fp32_neon_activation(), NEDepthwiseConvolutionAssemblyDispatch::is_optimized_supported(), arm_compute::cpu::qasymm8_neon_activation(), arm_compute::cpu::qasymm8_signed_neon_activation(), arm_compute::cpu::qsymm16_neon_activation(), INESimpleFunction::run(), NEFillBorder::run(), CPPUpsampleKernel::run(), GCDepthConcatenateLayerKernel::run(), GCActivationLayerKernel::run(), NEMeanStdDev::run(), GCLogits1DShiftExpSumKernel::run(), NEConvertQuantizedSignednessKernel::run(), NEDepthToSpaceLayerKernel::run(), NEROIPoolingLayerKernel::run(), GCPoolingLayerKernel::run(), NEConvertFullyConnectedWeights::run(), NEDerivative::run(), CLDepthToSpaceLayerKernel::run(), CLReverseKernel::run(), CLSelectKernel::run(), CLSpaceToDepthLayerKernel::run(), CLDeconvolutionLayerUpsampleKernel::run(), CLFFTScaleKernel::run(), NEGaussian5x5::run(), CLScaleKernel::run(), CLMinMaxLayerKernel::run(), CLNormalizationLayerKernel::run(), CLGatherKernel::run(), CLComparisonKernel::run(), CLGEMMLowpQuantizeDownInt32ScaleByFixedPointKernel::run(), CLTileKernel::run(), NESobel7x7::run(), NESobel5x5::run(), CLFFTDigitReverseKernel::run(), CLInstanceNormalizationLayerKernel::run(), CLROIPoolingLayerKernel::run(), NEFFT1D::run(), NEFastCorners::run(), GCCol2ImKernel::run(), GCIm2ColKernel::run(), CLNormalizePlanarYUVLayerKernel::run(), NEInstanceNormalizationLayer::run(), CLReductionOperationKernel::run(), CpuPooling::run(), NECannyEdge::run(), CLFFTRadixStageKernel::run(), CLFillBorderKernel::run(), NEBatchToSpaceLayerKernel::run(), CLL2NormalizeLayerKernel::run(), NEPadLayer::run(), CLGEMMLowpQuantizeDownInt32ScaleByFloatKernel::run(), CLGEMMLowpQuantizeDownInt32ScaleKernel::run(), NECropResize::run(), CLLogits1DMaxShiftExpSumKernel::run(), CLStackLayerKernel::run(), CLArgMinMaxLayerKernel::run(), CLCol2ImKernel::run(), CLDeconvolutionReshapeOutputKernel::run(), NEHarrisCorners::run(), GCLogits1DNormKernel::run(), CLBatchToSpaceLayerKernel::run(), CLDepthwiseConvolutionLayer3x3NCHWKernel::run(), CLDepthwiseConvolutionLayer3x3NHWCKernel::run(), CLGEMMLowpOffsetContributionKernel::run(), CLWinogradInputTransformKernel::run(), NEDirectConvolutionLayer::run(), CLFuseBatchNormalizationKernel::run(), NEGaussianPyramidHalf::run(), CLDirectConvolutionLayerKernel::run(), CLSpaceToBatchLayerKernel::run(), CLWinogradOutputTransformKernel::run(), CLDepthwiseConvolutionLayerNativeKernel::run(), NEConvolutionSquare< matrix_size >::run(), CLGEMMLowpOffsetContributionOutputStageKernel::run(), CLIm2ColKernel::run(), CLGEMMLowpMatrixAReductionKernel::run(), CLGEMMLowpMatrixMultiplyReshapedOnlyRHSKernel::run(), CLLogits1DNormKernel::run(), CLGEMMLowpMatrixBReductionKernel::run(), CpuFillKernel::run_op(), ClElementwiseKernel::run_op(), ClFloorKernel::run_op(), ClReshapeKernel::run_op(), ClCopyKernel::run_op(), ClElementWiseUnaryKernel::run_op(), ClActivationKernel::run_op(), ClPoolingKernel::run_op(), CpuPoolingKernel::run_op(), ClFillKernel::run_op(), CLStridedSliceKernel::run_op(), ClPermuteKernel::run_op(), CLFillBorderKernel::run_op(), CLPixelWiseMultiplicationKernel::run_op(), CLComplexPixelWiseMultiplicationKernel::run_op(), NEThresholdKernel::validate(), CpuConcatenate::validate(), NEQuantizationLayerKernel::validate(), ClConcatenate::validate(), NEDeconvolutionLayer::validate(), NEGEMMLowpMatrixAReductionKernel::validate(), NEGEMMLowpMatrixBReductionKernel::validate(), and Window::z().


The documentation for this class was generated from the following files: