Compute Library
 20.02.1
BorderSize Struct Reference

Container for 2D border size. More...

#include <Types.h>

Public Member Functions

constexpr BorderSize ()
 Empty border, i.e. More...
 
constexpr BorderSize (unsigned int size)
 Border with equal size around the 2D plane. More...
 
constexpr BorderSize (unsigned int top_bottom, unsigned int left_right)
 Border with same size for top/bottom and left/right. More...
 
constexpr BorderSize (unsigned int top, unsigned int right, unsigned int bottom, unsigned int left)
 Border with different sizes. More...
 
constexpr bool empty () const
 Check if the entire border is zero. More...
 
constexpr bool uniform () const
 Check if the border is the same size on all sides. More...
 
BorderSizeoperator *= (float scale)
 Scale this border size. More...
 
BorderSize operator * (float scale)
 Scale a copy of this border size. More...
 
void limit (const BorderSize &limit)
 Limit this border size. More...
 

Data Fields

unsigned int top
 top of the border More...
 
unsigned int right
 right of the border More...
 
unsigned int bottom
 bottom of the border More...
 
unsigned int left
 left of the border More...
 

Detailed Description

Container for 2D border size.

Definition at line 269 of file Types.h.

Constructor & Destructor Documentation

◆ BorderSize() [1/4]

constexpr BorderSize ( )
inline

Empty border, i.e.

no border

Definition at line 272 of file Types.h.

273  : top{ 0 }, right{ 0 }, bottom{ 0 }, left{ 0 }
274  {
275  }
unsigned int top
top of the border
Definition: Types.h:349
unsigned int bottom
bottom of the border
Definition: Types.h:351
unsigned int left
left of the border
Definition: Types.h:352
unsigned int right
right of the border
Definition: Types.h:350

◆ BorderSize() [2/4]

constexpr BorderSize ( unsigned int  size)
inlineexplicit

Border with equal size around the 2D plane.

Definition at line 278 of file Types.h.

279  : top{ size }, right{ size }, bottom{ size }, left{ size }
280  {
281  }
unsigned int top
top of the border
Definition: Types.h:349
unsigned int bottom
bottom of the border
Definition: Types.h:351
unsigned int left
left of the border
Definition: Types.h:352
unsigned int right
right of the border
Definition: Types.h:350

◆ BorderSize() [3/4]

constexpr BorderSize ( unsigned int  top_bottom,
unsigned int  left_right 
)
inline

Border with same size for top/bottom and left/right.

Definition at line 284 of file Types.h.

285  : top{ top_bottom }, right{ left_right }, bottom{ top_bottom }, left{ left_right }
286  {
287  }
unsigned int top
top of the border
Definition: Types.h:349
unsigned int bottom
bottom of the border
Definition: Types.h:351
unsigned int left
left of the border
Definition: Types.h:352
unsigned int right
right of the border
Definition: Types.h:350

◆ BorderSize() [4/4]

constexpr BorderSize ( unsigned int  top,
unsigned int  right,
unsigned int  bottom,
unsigned int  left 
)
inline

Border with different sizes.

Definition at line 290 of file Types.h.

291  : top{ top }, right{ right }, bottom{ bottom }, left{ left }
292  {
293  }
unsigned int top
top of the border
Definition: Types.h:349
unsigned int bottom
bottom of the border
Definition: Types.h:351
unsigned int left
left of the border
Definition: Types.h:352
unsigned int right
right of the border
Definition: Types.h:350

References BorderSize::top.

Member Function Documentation

◆ empty()

constexpr bool empty ( ) const
inline

Check if the entire border is zero.

Definition at line 296 of file Types.h.

297  {
298  return top == 0 && right == 0 && bottom == 0 && left == 0;
299  }
unsigned int top
top of the border
Definition: Types.h:349
unsigned int bottom
bottom of the border
Definition: Types.h:351
unsigned int left
left of the border
Definition: Types.h:352
unsigned int right
right of the border
Definition: Types.h:350

References BorderSize::bottom, BorderSize::left, BorderSize::right, and BorderSize::top.

Referenced by CLCopyKernel::configure(), NECopyKernel::configure(), CLFillBorderKernel::configure(), GCFillBorderKernel::configure(), TensorInfo::has_padding(), NEFillInnerBorderKernel::run(), NEFillBorderKernel::run(), CLCopyKernel::validate(), and NECopyKernel::validate().

◆ limit()

void limit ( const BorderSize limit)
inline

Limit this border size.

Parameters
[in]limitBorder size to limit this border size to.

Definition at line 341 of file Types.h.

342  {
343  top = std::min(top, limit.top);
344  right = std::min(right, limit.right);
345  bottom = std::min(bottom, limit.bottom);
346  left = std::min(left, limit.left);
347  }
unsigned int top
top of the border
Definition: Types.h:349
unsigned int bottom
bottom of the border
Definition: Types.h:351
unsigned int left
left of the border
Definition: Types.h:352
unsigned int right
right of the border
Definition: Types.h:350
void limit(const BorderSize &limit)
Limit this border size.
Definition: Types.h:341

References BorderSize::bottom, BorderSize::left, BorderSize::right, and BorderSize::top.

Referenced by CLFillBorderKernel::configure(), GCFillBorderKernel::configure(), and NEFillBorderKernel::configure().

◆ operator *()

BorderSize operator * ( float  scale)
inline

Scale a copy of this border size.

Parameters
[in]scaleScale to multiply border size by.
Returns
a scaled copy of this.

Definition at line 329 of file Types.h.

330  {
331  BorderSize size = *this;
332  size *= scale;
333 
334  return size;
335  }
constexpr BorderSize()
Empty border, i.e.
Definition: Types.h:272

References arm_compute::test::validation::scale.

◆ operator *=()

BorderSize& operator *= ( float  scale)
inline

Scale this border size.

Parameters
[in]scaleScale to multiply border size by.
Returns
*this.

Definition at line 313 of file Types.h.

314  {
315  top *= scale;
316  right *= scale;
317  bottom *= scale;
318  left *= scale;
319 
320  return *this;
321  }
unsigned int top
top of the border
Definition: Types.h:349
unsigned int bottom
bottom of the border
Definition: Types.h:351
unsigned int left
left of the border
Definition: Types.h:352
unsigned int right
right of the border
Definition: Types.h:350

References BorderSize::bottom, BorderSize::left, BorderSize::right, arm_compute::test::validation::scale, and BorderSize::top.

◆ uniform()

constexpr bool uniform ( ) const
inline

Check if the border is the same size on all sides.

Definition at line 302 of file Types.h.

303  {
304  return top == right && top == bottom && top == left;
305  }
unsigned int top
top of the border
Definition: Types.h:349
unsigned int bottom
bottom of the border
Definition: Types.h:351
unsigned int left
left of the border
Definition: Types.h:352
unsigned int right
right of the border
Definition: Types.h:350

References BorderSize::bottom, BorderSize::left, BorderSize::right, and BorderSize::top.

Field Documentation

◆ bottom

◆ left

unsigned int left

left of the border

Definition at line 352 of file Types.h.

Referenced by arm_compute::calculate_max_enlarged_window(), arm_compute::calculate_max_window(), arm_compute::calculate_max_window_horizontal(), AccessWindowTranspose::compute_valid_region(), AccessWindowRectangle::compute_valid_region(), CLWarpPerspectiveKernel::configure(), CLBox3x3Kernel::configure(), CLErodeKernel::configure(), CLGaussian3x3Kernel::configure(), CLMedian3x3Kernel::configure(), CLDilateKernel::configure(), CLNonMaximaSuppression3x3Kernel::configure(), CLWarpAffineKernel::configure(), NEGaussian3x3Kernel::configure(), NEMedian3x3Kernel::configure(), NEGaussian5x5HorKernel::configure(), CLNonLinearFilterKernel::configure(), CLGaussianPyramidHorKernel::configure(), CLRemapKernel::configure(), CLSobel3x3Kernel::configure(), CLDerivativeKernel::configure(), GCFillBorderKernel::configure(), CLFillBorderKernel::configure(), NEGaussianPyramidHorKernel::configure(), INEWarpKernel::configure(), CLSobel5x5HorKernel::configure(), CLSobel7x7HorKernel::configure(), NEDerivativeKernel::configure(), NENonLinearFilterKernel::configure(), NESobel5x5HorKernel::configure(), NESobel7x7HorKernel::configure(), NENonMaximaSuppression3x3Kernel::configure(), CLHarrisScoreKernel::configure(), CLFastCornersKernel::configure(), NESobel3x3Kernel::configure(), NEScharr3x3Kernel::configure(), CLScharr3x3Kernel::configure(), GCTensorShiftKernel::configure(), CLEdgeNonMaxSuppressionKernel::configure(), CLConvolutionRectangleKernel::configure(), NEConvolutionRectangleKernel::configure(), BorderSize::empty(), TensorInfo::extend_padding(), AssetsLibrary::fill_borders_with_garbage(), BorderSize::limit(), BorderSize::operator *=(), arm_compute::operator<<(), NEFillBorderKernel::run(), CLDirectConvolutionLayerKernel::run(), arm_compute::test::shape_to_valid_region_laplacian_pyramid(), BorderSize::uniform(), AccessWindowTranspose::update_padding_if_needed(), AccessWindowStatic::update_padding_if_needed(), AccessWindowRectangle::update_window_if_needed(), and arm_compute::test::validation::validate().

◆ right

◆ top

unsigned int top

top of the border

Definition at line 349 of file Types.h.

Referenced by BorderSize::BorderSize(), arm_compute::calculate_max_enlarged_window(), arm_compute::calculate_max_window(), arm_compute::calculate_max_window_horizontal(), AccessWindowTranspose::compute_valid_region(), AccessWindowRectangle::compute_valid_region(), CLWarpPerspectiveKernel::configure(), CLErodeKernel::configure(), CLGaussian3x3Kernel::configure(), CLBox3x3Kernel::configure(), CLDilateKernel::configure(), CLMedian3x3Kernel::configure(), CLNonMaximaSuppression3x3Kernel::configure(), CLWarpAffineKernel::configure(), NEGaussian3x3Kernel::configure(), NEMedian3x3Kernel::configure(), CLNonLinearFilterKernel::configure(), CLRemapKernel::configure(), CLSobel3x3Kernel::configure(), CLDerivativeKernel::configure(), CLFillBorderKernel::configure(), GCFillBorderKernel::configure(), INEWarpKernel::configure(), NEDerivativeKernel::configure(), NENonLinearFilterKernel::configure(), NENonMaximaSuppression3x3Kernel::configure(), CLHarrisScoreKernel::configure(), CLFastCornersKernel::configure(), CLScharr3x3Kernel::configure(), NEScharr3x3Kernel::configure(), NESobel3x3Kernel::configure(), NEGaussian5x5VertKernel::configure(), CLGaussianPyramidVertKernel::configure(), CLEdgeNonMaxSuppressionKernel::configure(), NEGaussianPyramidVertKernel::configure(), CLSobel5x5VertKernel::configure(), CLSobel7x7VertKernel::configure(), NESobel5x5VertKernel::configure(), NESobel7x7VertKernel::configure(), CLConvolutionRectangleKernel::configure(), NEConvolutionRectangleKernel::configure(), BorderSize::empty(), TensorInfo::extend_padding(), AssetsLibrary::fill_borders_with_garbage(), BorderSize::limit(), BorderSize::operator *=(), arm_compute::operator<<(), NEFillBorderKernel::run(), CLGEMMLowpMatrixMultiplyKernel::run(), CLGEMMLowpMatrixMultiplyNativeKernel::run(), CLGEMMReshapeLHSMatrixKernel::run(), CLGEMMLowpMatrixMultiplyReshapedOnlyRHSKernel::run(), CLDirectConvolutionLayerKernel::run(), CLGEMMMatrixMultiplyNativeKernel::run(), CLGEMMLowpMatrixMultiplyReshapedKernel::run(), CLGEMMMatrixMultiplyKernel::run(), CLGEMMMatrixMultiplyReshapedOnlyRHSKernel::run(), arm_compute::test::shape_to_valid_region_laplacian_pyramid(), BorderSize::uniform(), AccessWindowTranspose::update_padding_if_needed(), AccessWindowStatic::update_padding_if_needed(), AccessWindowRectangle::update_window_if_needed(), and arm_compute::test::validation::validate().


The documentation for this struct was generated from the following file: