ArmNN
 22.11
Int32ToInt32tDecoder Class Reference

#include <BaseIterator.hpp>

Inheritance diagram for Int32ToInt32tDecoder:
TypedIterator< const int32_t, Decoder< int32_t > > Decoder< int32_t > BaseIterator

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 ()
 
- 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 434 of file BaseIterator.hpp.

Constructor & Destructor Documentation

◆ Int32ToInt32tDecoder() [1/2]

Int32ToInt32tDecoder ( const int32_t *  data)
inline

Definition at line 437 of file BaseIterator.hpp.

438  : TypedIterator(data){}

◆ Int32ToInt32tDecoder() [2/2]

Definition at line 440 of file BaseIterator.hpp.

Member Function Documentation

◆ DecodeTensor()

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

Implements Decoder< int32_t >.

Definition at line 447 of file BaseIterator.hpp.

References TensorShape::GetNumElements(), armnn::IgnoreUnused(), and BaseIterator::operator[]().

449  {
450  IgnoreUnused(isDepthwise);
451 
452  const unsigned int size = tensorShape.GetNumElements();
453  std::vector<float> decodedTensor;
454  decodedTensor.reserve(size);
455 
456  for (uint32_t i = 0; i < size; ++i)
457  {
458  this->operator[](i);
459  decodedTensor.emplace_back(static_cast<float>(*m_Iterator));
460  }
461 
462  return decodedTensor;
463  }
void IgnoreUnused(Ts &&...)
TypedIterator & operator[](const unsigned int index) override

◆ Get()

int32_t Get ( ) const
inlineoverridevirtual

Implements Decoder< int32_t >.

Definition at line 443 of file BaseIterator.hpp.

444  {
445  return *m_Iterator;
446  }

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