ArmNN
 24.02
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 428 of file BaseIterator.hpp.

Constructor & Destructor Documentation

◆ BooleanDecoder() [1/2]

BooleanDecoder ( const uint8_t *  data)
inline

Definition at line 431 of file BaseIterator.hpp.

432  : TypedIterator(data) {}

◆ BooleanDecoder() [2/2]

BooleanDecoder ( )
inline

Definition at line 434 of file BaseIterator.hpp.

435  : BooleanDecoder(nullptr) {}

Member Function Documentation

◆ DecodeTensor()

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

Implements Decoder< float >.

Definition at line 441 of file BaseIterator.hpp.

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

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 437 of file BaseIterator.hpp.

438  {
439  return *m_Iterator;
440  }

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:108
armnn::TypedIterator< const uint8_t, Decoder< float > >::TypedIterator
TypedIterator(const uint8_t *data=nullptr)
Definition: BaseIterator.hpp:69
armnn::TypedIterator< const uint8_t, Decoder< float > >::operator[]
TypedIterator & operator[](const unsigned int index) override
Definition: BaseIterator.hpp:100
armnn::BooleanDecoder::BooleanDecoder
BooleanDecoder()
Definition: BaseIterator.hpp:434