Compute Library
 19.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)
 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 
)
inline

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), height(h)
46  {
47  }
SimpleTensor< float > w
Definition: DFT.cpp:156
size_t height
Height of the image region or rectangle.
Definition: Size2D.h:93
size_t width
Width of the image region or rectangle.
Definition: Size2D.h:92

Member Function Documentation

◆ area()

◆ operator!=()

bool operator!= ( const Size2D other) const
inline

Definition at line 63 of file Size2D.h.

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

◆ operator==()

bool operator== ( const Size2D other) const
inline

Definition at line 58 of file Size2D.h.

59  {
60  return (width == other.width) && (height == other.height);
61  }
size_t height
Height of the image region or rectangle.
Definition: Size2D.h:93
size_t width
Width of the image region or rectangle.
Definition: Size2D.h:92

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

◆ to_string()

std::string to_string ( ) const
inline

Definition at line 68 of file Size2D.h.

69  {
71  }
std::string to_string(T &&value)
Convert integer and float values to string.
size_t height
Height of the image region or rectangle.
Definition: Size2D.h:93
size_t width
Width of the image region or rectangle.
Definition: Size2D.h:92

References Size2D::height, arm_compute::support::cpp11::to_string(), and Size2D::width.

Referenced by CLWinogradInputTransformKernel::configure(), CLWinogradFilterTransformKernel::configure(), and CLWinogradOutputTransformKernel::configure().

◆ x()

size_t x ( ) const
inline

Semantic accessor for width as x.

Returns
x.

Definition at line 77 of file Size2D.h.

78  {
79  return width;
80  }
size_t width
Width of the image region or rectangle.
Definition: Size2D.h:92

References Size2D::width.

Referenced by UpsampleLayerNode::compute_output_descriptor(), arm_compute::misc::shape_calculator::compute_space_to_batch_shape(), CLWinogradOutputTransformKernel::configure(), and NESpaceToBatchLayerKernel::run().

◆ y()

size_t y ( ) const
inline

Semantic accessor for height as y.

Returns
y.

Definition at line 86 of file Size2D.h.

87  {
88  return height;
89  }
size_t height
Height of the image region or rectangle.
Definition: Size2D.h:93

References Size2D::height.

Referenced by UpsampleLayerNode::compute_output_descriptor(), arm_compute::misc::shape_calculator::compute_space_to_batch_shape(), CLWinogradOutputTransformKernel::configure(), and NESpaceToBatchLayerKernel::run().

Field Documentation

◆ height

size_t height = {}

Height of the image region or rectangle.

Definition at line 93 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::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(), NEPoolingLayer::configure(), CLPoolingLayerKernel::configure(), CLHOGOrientationBinningKernel::configure(), NEHOGDescriptor::configure(), NEPoolingLayerKernel::configure(), CLHOGDescriptor::configure(), CLDepthwiseIm2ColKernel::configure(), NEHOGOrientationBinningKernel::configure(), CLWinogradInputTransformKernel::configure(), NEHOGDetectorKernel::configure(), CLWinogradOutputTransformKernel::configure(), CLHOGDetectorKernel::configure(), CLIm2ColKernel::configure(), GCIm2ColKernel::configure(), CLHOGMultiDetection::configure(), NEHOGMultiDetection::configure(), NEIm2ColKernel::configure(), CLHOGBlockNormalizationKernel::configure(), NEHOGBlockNormalizationKernel::configure(), arm_compute::test::validation::reference::hog_block_normalization(), arm_compute::test::validation::reference::hog_descriptor(), arm_compute::test::validation::reference::hog_detector(), arm_compute::test::validation::reference::hog_multi_detection(), arm_compute::test::validation::reference::hog_orientation_binning(), arm_compute::test::validation::reference::im2col_nchw(), arm_compute::test::validation::reference::im2col_nhwc(), HOGInfo::init(), TensorInfo::init(), TensorInfo::init_auto_padding(), HOGInfo::num_block_positions_per_image(), HOGInfo::num_cells_per_block(), HOGInfo::num_cells_per_block_stride(), arm_compute::operator<<(), Size2D::operator==(), CLHOGOrientationBinningKernel::run(), CLHOGBlockNormalizationKernel::run(), NEHOGBlockNormalizationKernel::run(), Size2D::to_string(), NEPoolingLayerKernel::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 92 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::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(), NEPoolingLayer::configure(), GCPoolingLayerKernel::configure(), CLHOGOrientationBinningKernel::configure(), CLPoolingLayerKernel::configure(), NEHOGDescriptor::configure(), NEPoolingLayerKernel::configure(), CLHOGDescriptor::configure(), CLDepthwiseIm2ColKernel::configure(), NEHOGOrientationBinningKernel::configure(), CLWinogradInputTransformKernel::configure(), NEHOGDetectorKernel::configure(), CLWinogradOutputTransformKernel::configure(), CLHOGDetectorKernel::configure(), CLCol2ImKernel::configure(), CLIm2ColKernel::configure(), GCIm2ColKernel::configure(), CLHOGMultiDetection::configure(), NEHOGMultiDetection::configure(), NEIm2ColKernel::configure(), CLHOGBlockNormalizationKernel::configure(), NEHOGBlockNormalizationKernel::configure(), arm_compute::test::validation::reference::hog_block_normalization(), arm_compute::test::validation::reference::hog_descriptor(), arm_compute::test::validation::reference::hog_detector(), arm_compute::test::validation::reference::hog_multi_detection(), arm_compute::test::validation::reference::hog_orientation_binning(), arm_compute::test::validation::reference::im2col_nchw(), arm_compute::test::validation::reference::im2col_nhwc(), HOGInfo::init(), TensorInfo::init(), TensorInfo::init_auto_padding(), HOGInfo::num_block_positions_per_image(), HOGInfo::num_cells_per_block(), HOGInfo::num_cells_per_block_stride(), arm_compute::operator<<(), Size2D::operator==(), CLHOGOrientationBinningKernel::run(), NEPoolingLayerKernel::run(), CLHOGBlockNormalizationKernel::run(), NEHOGBlockNormalizationKernel::run(), Size2D::to_string(), NEPoolingLayerKernel::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 file: