Compute Library
 22.05
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.

References Size3D::to_string().

44  : width(w), height(h), depth(d)
45  {
46  }
SimpleTensor< float > w
Definition: DFT.cpp:156
size_t height
Height of the 3D shape or object.
Definition: Size3D.h:93
size_t width
Width of the 3D shape or object.
Definition: Size3D.h:92
size_t depth
Depth of the 3D shape or object.
Definition: Size3D.h:94

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.

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

87  {
88  return (width == other.width) && (height == other.height) && (depth == other.depth);
89  }
size_t height
Height of the 3D shape or object.
Definition: Size3D.h:93
size_t width
Width of the 3D shape or object.
Definition: Size3D.h:92
size_t depth
Depth of the 3D shape or object.
Definition: Size3D.h:94

◆ 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.

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

Referenced by Size3D::Size3D().

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 }
std::string to_string(T &&value)
Convert integer and float values to string.
size_t height
Height of the 3D shape or object.
Definition: Size3D.h:93
size_t width
Width of the 3D shape or object.
Definition: Size3D.h:92
size_t depth
Depth of the 3D shape or object.
Definition: Size3D.h:94

◆ 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: