ArmNN
 23.08
Int32ToInt32tDecoder Class Reference

#include <BaseIterator.hpp>

Inheritance diagram for Int32ToInt32tDecoder:
[legend]
Collaboration diagram for Int32ToInt32tDecoder:
[legend]

Public Member Functions

 Int32ToInt32tDecoder (const int32_t *data)
 
 Int32ToInt32tDecoder ()
 
int32_t Get () const override
 
std::vector< float > DecodeTensor (const TensorShape &tensorShape, const bool isDepthwise) override
 
- Public Member Functions inherited from TypedIterator< const int32_t, Decoder< int32_t > >
 TypedIterator (const int32_t *data=nullptr)
 
void Reset (void *data) override
 
TypedIteratoroperator++ () override
 
TypedIteratoroperator+= (const unsigned int increment) override
 
TypedIteratoroperator-= (const unsigned int increment) override
 
TypedIteratoroperator[] (const unsigned int index) override
 
- Public Member Functions inherited from Decoder< int32_t >
 Decoder ()
 
virtual ~Decoder ()
 
virtual int32_t Get () const=0
 
- Public Member Functions inherited from BaseIterator
 BaseIterator ()
 
virtual ~BaseIterator ()
 

Additional Inherited Members

- Protected Attributes inherited from TypedIterator< const int32_t, Decoder< int32_t > >
const int32_t * m_Iterator
 
const int32_t * m_Start
 

Detailed Description

Definition at line 396 of file BaseIterator.hpp.

Constructor & Destructor Documentation

◆ Int32ToInt32tDecoder() [1/2]

Int32ToInt32tDecoder ( const int32_t *  data)
inline

Definition at line 399 of file BaseIterator.hpp.

400  : TypedIterator(data){}

◆ Int32ToInt32tDecoder() [2/2]

Definition at line 402 of file BaseIterator.hpp.

403  : Int32ToInt32tDecoder(nullptr) {}

Member Function Documentation

◆ DecodeTensor()

std::vector<float> DecodeTensor ( const TensorShape tensorShape,
const bool  isDepthwise 
)
inlineoverridevirtual

Implements Decoder< int32_t >.

Definition at line 409 of file BaseIterator.hpp.

411  {
412  IgnoreUnused(isDepthwise);
413 
414  const unsigned int size = tensorShape.GetNumElements();
415  std::vector<float> decodedTensor;
416  decodedTensor.reserve(size);
417 
418  for (uint32_t i = 0; i < size; ++i)
419  {
420  this->operator[](i);
421  decodedTensor.emplace_back(static_cast<float>(*m_Iterator));
422  }
423 
424  return decodedTensor;
425  }

References TensorShape::GetNumElements(), armnn::IgnoreUnused(), TypedIterator< const int32_t, Decoder< int32_t > >::m_Iterator, and TypedIterator< const int32_t, Decoder< int32_t > >::operator[]().

◆ Get()

int32_t Get ( ) const
inlineoverride

Definition at line 405 of file BaseIterator.hpp.

406  {
407  return *m_Iterator;
408  }

References TypedIterator< const int32_t, Decoder< int32_t > >::m_Iterator.


The documentation for this class was generated from the following file:
armnn::TypedIterator< const int32_t, Decoder< int32_t > >::m_Iterator
const int32_t * m_Iterator
Definition: BaseIterator.hpp:111
armnn::Int32ToInt32tDecoder::Int32ToInt32tDecoder
Int32ToInt32tDecoder()
Definition: BaseIterator.hpp:402
armnn::TypedIterator< const int32_t, Decoder< int32_t > >::TypedIterator
TypedIterator(const int32_t *data=nullptr)
Definition: BaseIterator.hpp:72
armnn::TypedIterator< const int32_t, Decoder< int32_t > >::operator[]
TypedIterator & operator[](const unsigned int index) override
Definition: BaseIterator.hpp:103
armnn::IgnoreUnused
void IgnoreUnused(Ts &&...)
Definition: IgnoreUnused.hpp:14