ArmNN
 24.08
BooleanDecoder Class Reference

#include <BaseIterator.hpp>

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

Public Member Functions

 BooleanDecoder (const uint8_t *data)
 
 BooleanDecoder ()
 
float Get () const override
 
std::vector< float > DecodeTensor (const TensorShape &tensorShape, const bool) override
 
- Public Member Functions inherited from TypedIterator< const uint8_t, Decoder< float > >
 TypedIterator (const uint8_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< float >
 Decoder ()
 
virtual ~Decoder ()
 
virtual float Get () const=0
 
- Public Member Functions inherited from BaseIterator
 BaseIterator ()
 
virtual ~BaseIterator ()
 

Additional Inherited Members

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

Detailed Description

Definition at line 427 of file BaseIterator.hpp.

Constructor & Destructor Documentation

◆ BooleanDecoder() [1/2]

BooleanDecoder ( const uint8_t *  data)
inline

Definition at line 430 of file BaseIterator.hpp.

431  : TypedIterator(data) {}

◆ BooleanDecoder() [2/2]

BooleanDecoder ( )
inline

Definition at line 433 of file BaseIterator.hpp.

434  : BooleanDecoder(nullptr) {}

Member Function Documentation

◆ DecodeTensor()

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

Implements Decoder< float >.

Definition at line 440 of file BaseIterator.hpp.

441  {
442  const unsigned int size = tensorShape.GetNumElements();
443  std::vector<float> decodedTensor;
444  decodedTensor.reserve(size);
445 
446  for (uint32_t i = 0; i < size; ++i)
447  {
448  this->operator[](i);
449  decodedTensor.emplace_back(*m_Iterator);
450  }
451 
452  return decodedTensor;
453  }

References TensorShape::GetNumElements(), TypedIterator< const uint8_t, Decoder< float > >::m_Iterator, and TypedIterator< const uint8_t, Decoder< float > >::operator[]().

◆ Get()

float Get ( ) const
inlineoverride

Definition at line 436 of file BaseIterator.hpp.

437  {
438  return *m_Iterator;
439  }

References TypedIterator< const uint8_t, Decoder< float > >::m_Iterator.


The documentation for this class was generated from the following file:
armnn::TypedIterator< const uint8_t, Decoder< float > >::m_Iterator
const uint8_t * m_Iterator
Definition: BaseIterator.hpp:107
armnn::TypedIterator< const uint8_t, Decoder< float > >::TypedIterator
TypedIterator(const uint8_t *data=nullptr)
Definition: BaseIterator.hpp:68
armnn::TypedIterator< const uint8_t, Decoder< float > >::operator[]
TypedIterator & operator[](const unsigned int index) override
Definition: BaseIterator.hpp:99
armnn::BooleanDecoder::BooleanDecoder
BooleanDecoder()
Definition: BaseIterator.hpp:433