Compute Library
 19.11
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 268 of file Types.h.

Constructor & Destructor Documentation

◆ BorderSize() [1/4]

constexpr BorderSize ( )
inline

Empty border, i.e.

no border

Definition at line 271 of file Types.h.

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

◆ BorderSize() [2/4]

constexpr BorderSize ( unsigned int  size)
inlineexplicit

Border with equal size around the 2D plane.

Definition at line 277 of file Types.h.

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

◆ 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 283 of file Types.h.

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

◆ 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 289 of file Types.h.

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

References BorderSize::top.

Member Function Documentation

◆ empty()

constexpr bool empty ( ) const
inline

Check if the entire border is zero.

Definition at line 295 of file Types.h.

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

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 340 of file Types.h.

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

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 328 of file Types.h.

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

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 312 of file Types.h.

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

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 301 of file Types.h.

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

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

Field Documentation

◆ bottom

◆ left

unsigned int left

left of the border

Definition at line 351 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 348 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(), 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: