Compute Library
 23.08
Size2D Class Reference

Class for specifying the size of an image or rectangle. More...

#include <Size2D.h>

Public Member Functions

 Size2D ()=default
 Default constructor. More...
 
 Size2D (size_t w, size_t h) noexcept
 Constructor. More...
 
size_t area () const
 The area of the image or rectangle calculated as (width * height) More...
 
bool operator== (const Size2D &other) const
 
bool operator!= (const Size2D &other) const
 
std::string to_string () const
 
size_t x () const
 Semantic accessor for width as x. More...
 
size_t y () const
 Semantic accessor for height as y. More...
 

Data Fields

size_t width = {}
 Width of the image region or rectangle. More...
 
size_t height = {}
 Height of the image region or rectangle. More...
 

Detailed Description

Class for specifying the size of an image or rectangle.

Definition at line 34 of file Size2D.h.

Constructor & Destructor Documentation

◆ Size2D() [1/2]

Size2D ( )
default

Default constructor.

◆ Size2D() [2/2]

Size2D ( size_t  w,
size_t  h 
)
inlinenoexcept

Constructor.

Initializes "width" and "height" respectively with "w" and "h"

Parameters
[in]wWidth of the image or rectangle
[in]hHeight of the image or rectangle

Definition at line 44 of file Size2D.h.

45  : width(w),
46  height(h)
47  {
48  }

Member Function Documentation

◆ area()

◆ operator!=()

bool operator!= ( const Size2D other) const
inline

Definition at line 64 of file Size2D.h.

65  {
66  return !(*this == other);
67  }

◆ operator==()

bool operator== ( const Size2D other) const
inline

Definition at line 59 of file Size2D.h.

60  {
61  return (width == other.width) && (height == other.height);
62  }

References Size2D::height, and Size2D::width.

◆ to_string()

◆ x()

◆ y()

Field Documentation

◆ height

size_t height = {}

Height of the image region or rectangle.

Definition at line 91 of file Size2D.h.

Referenced by GraphBuilder::add_convolution_node(), GraphBuilder::add_deconvolution_node(), GraphBuilder::add_depthwise_convolution_node(), Size2D::area(), arm_compute::cl_winograd_convolution_layer_supported(), arm_compute::misc::shape_calculator::compute_col2im_shape(), arm_compute::misc::shape_calculator::compute_im2col_conv_shape(), arm_compute::misc::shape_calculator::compute_pool_shape(), arm_compute::misc::shape_calculator::compute_unpool_shape(), arm_compute::compute_winograd_convolution_tiles(), arm_compute::misc::shape_calculator::compute_winograd_filter_transform_shape(), arm_compute::misc::shape_calculator::compute_winograd_input_transform_shape(), arm_compute::misc::shape_calculator::compute_winograd_output_transform_shape(), ClPool2dKernel::configure(), CpuPool2dKernel::configure(), CpuPool2d::configure(), ClWinogradFilterTransformKernel::configure(), ClWinogradInputTransformKernel::configure(), ClWinogradOutputTransformKernel::configure(), ClIm2ColKernel::configure(), CpuIm2ColKernel::configure(), arm_compute::test::validation::reference::im2col_nchw(), arm_compute::test::validation::reference::im2col_nhwc(), arm_compute::operator<<(), Size2D::operator==(), arm_compute::cpu::poolingMxN_fp32_neon_nhwc(), arm_compute::cpu::poolingMxN_fp32_neon_nhwc_kernel_indices(), arm_compute::cpu::poolingMxN_q8_neon_nhwc(), Size2D::to_string(), CpuPool2dKernel::validate(), arm_compute::test::validation::reference::winograd_filter_transform(), arm_compute::test::validation::reference::winograd_input_transform(), arm_compute::test::validation::reference::winograd_output_transform(), and Size2D::y().

◆ width

size_t width = {}

Width of the image region or rectangle.

Definition at line 90 of file Size2D.h.

Referenced by GraphBuilder::add_convolution_node(), GraphBuilder::add_deconvolution_node(), GraphBuilder::add_depthwise_convolution_node(), Size2D::area(), arm_compute::cl_winograd_convolution_layer_supported(), arm_compute::misc::shape_calculator::compute_col2im_shape(), arm_compute::misc::shape_calculator::compute_im2col_conv_shape(), arm_compute::misc::shape_calculator::compute_pool_shape(), arm_compute::misc::shape_calculator::compute_unpool_shape(), arm_compute::compute_winograd_convolution_tiles(), arm_compute::misc::shape_calculator::compute_winograd_filter_transform_shape(), arm_compute::misc::shape_calculator::compute_winograd_input_transform_shape(), arm_compute::misc::shape_calculator::compute_winograd_output_transform_shape(), ClPool2dKernel::configure(), CpuPool2dKernel::configure(), CpuPool2d::configure(), ClWinogradInputTransformKernel::configure(), ClWinogradFilterTransformKernel::configure(), ClWinogradOutputTransformKernel::configure(), ClCol2ImKernel::configure(), ClIm2ColKernel::configure(), CpuIm2ColKernel::configure(), arm_compute::test::validation::reference::im2col_nchw(), arm_compute::test::validation::reference::im2col_nhwc(), arm_compute::operator<<(), Size2D::operator==(), arm_compute::cpu::poolingMxN_fp32_neon_nhwc(), arm_compute::cpu::poolingMxN_fp32_neon_nhwc_kernel_indices(), arm_compute::cpu::poolingMxN_q8_neon_nhwc(), CpuPool2dKernel::run_op(), Size2D::to_string(), CpuPool2dKernel::validate(), arm_compute::test::validation::reference::winograd_filter_transform(), arm_compute::test::validation::reference::winograd_input_transform(), arm_compute::test::validation::reference::winograd_output_transform(), and Size2D::x().


The documentation for this class was generated from the following files:
arm_compute::support::cpp11::to_string
std::string to_string(T &&value)
Convert integer and float values to string.
Definition: StringSupport.h:168
arm_compute::Size2D::height
size_t height
Height of the image region or rectangle.
Definition: Size2D.h:91
arm_compute::Size2D::width
size_t width
Width of the image region or rectangle.
Definition: Size2D.h:90
arm_compute::test::validation::w
SimpleTensor< float > w
Definition: DFT.cpp:156