ONE - On-device Neural Engine
Loading...
Searching...
No Matches
tfinfo::v2::ShapeHint Class Reference

Class to represent axis and size of dims. User should enter axis and size of dim(s) when input tensor(s) contain(s) unknown dim(s). Such axis and size of dim(s) will be stored in ShapeHint. More...

#include <TensorSignature.h>

Public Member Functions

 ShapeHint ()=default
 
void add (AxisHint axis, SizeHint size)
 
std::map< AxisHint, SizeHint >::const_iterator cbegin () const
 
std::map< AxisHint, SizeHint >::const_iterator cend () const
 
bool empty ()
 
size_t size ()
 

Detailed Description

Class to represent axis and size of dims. User should enter axis and size of dim(s) when input tensor(s) contain(s) unknown dim(s). Such axis and size of dim(s) will be stored in ShapeHint.

Definition at line 47 of file TensorSignature.h.

Constructor & Destructor Documentation

◆ ShapeHint()

tfinfo::v2::ShapeHint::ShapeHint ( )
default

Member Function Documentation

◆ add()

void tfinfo::v2::ShapeHint::add ( AxisHint  axis,
SizeHint  size 
)
inline

Definition at line 55 of file TensorSignature.h.

56 {
57 if (_dims.find(axis) != _dims.end())
58 throw std::runtime_error("dim value already exists");
59
60 _dims[axis] = size;
61 }

References size().

◆ cbegin()

std::map< AxisHint, SizeHint >::const_iterator tfinfo::v2::ShapeHint::cbegin ( ) const
inline

Definition at line 63 of file TensorSignature.h.

63{ return _dims.cbegin(); }

◆ cend()

std::map< AxisHint, SizeHint >::const_iterator tfinfo::v2::ShapeHint::cend ( ) const
inline

Definition at line 65 of file TensorSignature.h.

65{ return _dims.cend(); }

◆ empty()

bool tfinfo::v2::ShapeHint::empty ( )
inline

Definition at line 67 of file TensorSignature.h.

67{ return _dims.size() == 0; }

◆ size()

size_t tfinfo::v2::ShapeHint::size ( )
inline

Definition at line 69 of file TensorSignature.h.

69{ return _dims.size(); }

Referenced by add().


The documentation for this class was generated from the following file: