Compute Library
 19.08
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 259 of file Types.h.

Constructor & Destructor Documentation

◆ BorderSize() [1/4]

constexpr BorderSize ( )
inline

Empty border, i.e.

no border

Definition at line 262 of file Types.h.

263  : top{ 0 }, right{ 0 }, bottom{ 0 }, left{ 0 }
264  {
265  }
unsigned int top
top of the border
Definition: Types.h:339
unsigned int bottom
bottom of the border
Definition: Types.h:341
unsigned int left
left of the border
Definition: Types.h:342
unsigned int right
right of the border
Definition: Types.h:340

◆ BorderSize() [2/4]

constexpr BorderSize ( unsigned int  size)
inlineexplicit

Border with equal size around the 2D plane.

Definition at line 268 of file Types.h.

269  : top{ size }, right{ size }, bottom{ size }, left{ size }
270  {
271  }
unsigned int top
top of the border
Definition: Types.h:339
unsigned int bottom
bottom of the border
Definition: Types.h:341
unsigned int left
left of the border
Definition: Types.h:342
unsigned int right
right of the border
Definition: Types.h:340

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

275  : top{ top_bottom }, right{ left_right }, bottom{ top_bottom }, left{ left_right }
276  {
277  }
unsigned int top
top of the border
Definition: Types.h:339
unsigned int bottom
bottom of the border
Definition: Types.h:341
unsigned int left
left of the border
Definition: Types.h:342
unsigned int right
right of the border
Definition: Types.h:340

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

281  : top{ top }, right{ right }, bottom{ bottom }, left{ left }
282  {
283  }
unsigned int top
top of the border
Definition: Types.h:339
unsigned int bottom
bottom of the border
Definition: Types.h:341
unsigned int left
left of the border
Definition: Types.h:342
unsigned int right
right of the border
Definition: Types.h:340

References BorderSize::top.

Member Function Documentation

◆ empty()

constexpr bool empty ( ) const
inline

Check if the entire border is zero.

Definition at line 286 of file Types.h.

287  {
288  return top == 0 && right == 0 && bottom == 0 && left == 0;
289  }
unsigned int top
top of the border
Definition: Types.h:339
unsigned int bottom
bottom of the border
Definition: Types.h:341
unsigned int left
left of the border
Definition: Types.h:342
unsigned int right
right of the border
Definition: Types.h:340

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

Referenced by CLCopyKernel::configure(), CLFillBorderKernel::configure(), GCFillBorderKernel::configure(), TensorInfo::has_padding(), NEFillInnerBorderKernel::run(), NEFillBorderKernel::run(), and CLCopyKernel::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 331 of file Types.h.

332  {
333  top = std::min(top, limit.top);
334  right = std::min(right, limit.right);
335  bottom = std::min(bottom, limit.bottom);
336  left = std::min(left, limit.left);
337  }
unsigned int top
top of the border
Definition: Types.h:339
unsigned int bottom
bottom of the border
Definition: Types.h:341
unsigned int left
left of the border
Definition: Types.h:342
unsigned int right
right of the border
Definition: Types.h:340
void limit(const BorderSize &limit)
Limit this border size.
Definition: Types.h:331

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

320  {
321  BorderSize size = *this;
322  size *= scale;
323 
324  return size;
325  }
constexpr BorderSize()
Empty border, i.e.
Definition: Types.h:262

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

304  {
305  top *= scale;
306  right *= scale;
307  bottom *= scale;
308  left *= scale;
309 
310  return *this;
311  }
unsigned int top
top of the border
Definition: Types.h:339
unsigned int bottom
bottom of the border
Definition: Types.h:341
unsigned int left
left of the border
Definition: Types.h:342
unsigned int right
right of the border
Definition: Types.h:340

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

293  {
294  return top == right && top == bottom && top == left;
295  }
unsigned int top
top of the border
Definition: Types.h:339
unsigned int bottom
bottom of the border
Definition: Types.h:341
unsigned int left
left of the border
Definition: Types.h:342
unsigned int right
right of the border
Definition: Types.h:340

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

Field Documentation

◆ bottom

unsigned int bottom

bottom of the border

Definition at line 341 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(), CLWarpAffineKernel::configure(), CLRemapKernel::configure(), GCDepthwiseConvolutionLayer3x3Kernel::configure(), INEWarpKernel::configure(), CLFillBorderKernel::configure(), GCFillBorderKernel::configure(), NERemapKernel::configure(), GCDirectConvolutionLayerKernel< kernel_size >::configure(), CLDepthwiseConvolutionLayer::configure(), NEEdgeTraceKernel::configure(), NEDepthwiseConvolutionLayer::configure(), BorderSize::empty(), TensorInfo::extend_padding(), AssetsLibrary::fill_borders_with_garbage(), BorderSize::limit(), BorderSize::operator *=(), arm_compute::operator<<(), CLGEMMMatrixVectorMultiplyKernel::run(), NEFillBorderKernel::run(), CLGEMMLowpMatrixMultiplyKernel::run(), CLGEMMLowpMatrixMultiplyNativeKernel::run(), CLGEMMReshapeLHSMatrixKernel::run(), CLGEMMLowpMatrixMultiplyReshapedOnlyRHSKernel::run(), CLGEMMLowpMatrixMultiplyReshapedKernel::run(), CLGEMMMatrixMultiplyKernel::run(), CLGEMMMatrixMultiplyNativeKernel::run(), CLGEMMMatrixMultiplyReshapedOnlyRHSKernel::run(), CLGEMMMatrixMultiplyReshapedKernel::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().

◆ left

unsigned int left

left of the border

Definition at line 342 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(), CLGaussian3x3Kernel::configure(), CLBox3x3Kernel::configure(), CLErodeKernel::configure(), CLMedian3x3Kernel::configure(), CLDilateKernel::configure(), CLNonMaximaSuppression3x3Kernel::configure(), CLWarpAffineKernel::configure(), NEDilateKernel::configure(), NEErodeKernel::configure(), NEGaussian3x3Kernel::configure(), NEMedian3x3Kernel::configure(), NEGaussian5x5HorKernel::configure(), CLNonLinearFilterKernel::configure(), CLGaussianPyramidHorKernel::configure(), CLRemapKernel::configure(), GCDepthwiseConvolutionLayer3x3Kernel::configure(), CLSobel3x3Kernel::configure(), CLDerivativeKernel::configure(), GCFillBorderKernel::configure(), CLFillBorderKernel::configure(), NEGaussianPyramidHorKernel::configure(), CLSobel5x5HorKernel::configure(), CLSobel7x7HorKernel::configure(), INEWarpKernel::configure(), NEDerivativeKernel::configure(), GCDirectConvolutionLayerKernel< kernel_size >::configure(), NEFastCornersKernel::configure(), NERemapKernel::configure(), NENonLinearFilterKernel::configure(), NESobel5x5HorKernel::configure(), NESobel7x7HorKernel::configure(), NENonMaximaSuppression3x3Kernel::configure(), CLHarrisScoreKernel::configure(), CLFastCornersKernel::configure(), NESobel3x3Kernel::configure(), NEScharr3x3Kernel::configure(), CLScharr3x3Kernel::configure(), GCTensorShiftKernel::configure(), GCIm2ColKernel::configure(), CLEdgeNonMaxSuppressionKernel::configure(), NEEdgeNonMaxSuppressionKernel::configure(), CLConvolutionRectangleKernel::configure(), NEEdgeTraceKernel::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 339 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(), CLMedian3x3Kernel::configure(), CLBox3x3Kernel::configure(), CLGaussian3x3Kernel::configure(), CLDilateKernel::configure(), CLNonMaximaSuppression3x3Kernel::configure(), CLWarpAffineKernel::configure(), NEDilateKernel::configure(), NEErodeKernel::configure(), NEGaussian3x3Kernel::configure(), NEMedian3x3Kernel::configure(), CLNonLinearFilterKernel::configure(), CLRemapKernel::configure(), CLSobel3x3Kernel::configure(), GCDepthwiseConvolutionLayer3x3Kernel::configure(), CLDerivativeKernel::configure(), INEWarpKernel::configure(), CLFillBorderKernel::configure(), GCFillBorderKernel::configure(), NEDerivativeKernel::configure(), NERemapKernel::configure(), GCDirectConvolutionLayerKernel< kernel_size >::configure(), NEFastCornersKernel::configure(), NENonLinearFilterKernel::configure(), NENonMaximaSuppression3x3Kernel::configure(), CLHarrisScoreKernel::configure(), CLFastCornersKernel::configure(), NEScharr3x3Kernel::configure(), NESobel3x3Kernel::configure(), CLScharr3x3Kernel::configure(), NEGaussian5x5VertKernel::configure(), CLGaussianPyramidVertKernel::configure(), CLEdgeNonMaxSuppressionKernel::configure(), NEGaussianPyramidVertKernel::configure(), CLSobel7x7VertKernel::configure(), CLSobel5x5VertKernel::configure(), NESobel5x5VertKernel::configure(), NESobel7x7VertKernel::configure(), NEEdgeNonMaxSuppressionKernel::configure(), CLConvolutionRectangleKernel::configure(), NEEdgeTraceKernel::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(), CLGEMMMatrixMultiplyReshapedKernel::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: