Compute Library
 23.08
Size3D Class Reference

Class for specifying the size of a 3D shape or object. More...

#include <Size3D.h>

Public Member Functions

 Size3D ()=default
 Default constructor. More...
 
 Size3D (size_t w, size_t h, size_t d) noexcept
 Constructor. More...
 
std::string to_string () const
 Convert the values stored to string. More...
 
size_t x () const
 Semantic accessor for width as x. More...
 
size_t y () const
 Semantic accessor for height as y. More...
 
size_t z () const
 Semantic accessor for depth as z. More...
 
bool operator!= (const Size3D &other) const
 
bool operator== (const Size3D &other) const
 

Data Fields

size_t width = {}
 Width of the 3D shape or object. More...
 
size_t height = {}
 Height of the 3D shape or object. More...
 
size_t depth = {}
 Depth of the 3D shape or object. More...
 

Detailed Description

Class for specifying the size of a 3D shape or object.

Definition at line 32 of file Size3D.h.

Constructor & Destructor Documentation

◆ Size3D() [1/2]

Size3D ( )
default

Default constructor.

◆ Size3D() [2/2]

Size3D ( size_t  w,
size_t  h,
size_t  d 
)
inlinenoexcept

Constructor.

Initializes "width", "height" and "depth" respectively with "w", "h" and "d"

Parameters
[in]wWidth of the 3D shape or object
[in]hHeight of the 3D shape or object
[in]dDepth of the 3D shape or object

Definition at line 43 of file Size3D.h.

44  : width(w), height(h), depth(d)
45  {
46  }

Member Function Documentation

◆ operator!=()

bool operator!= ( const Size3D other) const
inline

Definition at line 81 of file Size3D.h.

82  {
83  return !(*this == other);
84  }

◆ operator==()

bool operator== ( const Size3D other) const
inline

Definition at line 86 of file Size3D.h.

87  {
88  return (width == other.width) && (height == other.height) && (depth == other.depth);
89  }

References Size3D::depth, Size3D::height, and Size3D::width.

◆ to_string()

std::string to_string ( ) const

Convert the values stored to string.

Returns
string of (width x height x depth).

Definition at line 29 of file Size3D.cpp.

30 {
31  return support::cpp11::to_string(width) + std::string("x") + support::cpp11::to_string(height) + std::string("x") + support::cpp11::to_string(depth);
32 }

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

◆ x()

size_t x ( ) const
inline

◆ y()

size_t y ( ) const
inline

◆ z()

size_t z ( ) const
inline

Field Documentation

◆ depth

◆ height

◆ width


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::Size3D::width
size_t width
Width of the 3D shape or object.
Definition: Size3D.h:92
arm_compute::Size3D::height
size_t height
Height of the 3D shape or object.
Definition: Size3D.h:93
arm_compute::Size3D::depth
size_t depth
Depth of the 3D shape or object.
Definition: Size3D.h:94
arm_compute::test::validation::w
SimpleTensor< float > w
Definition: DFT.cpp:156