ArmNN
 24.02
BooleanDecoderBool Class Reference

#include <BaseIterator.hpp>

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

Public Member Functions

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

Additional Inherited Members

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

Detailed Description

Definition at line 457 of file BaseIterator.hpp.

Constructor & Destructor Documentation

◆ BooleanDecoderBool() [1/2]

BooleanDecoderBool ( const uint8_t *  data)
inline

Definition at line 460 of file BaseIterator.hpp.

461  : TypedIterator(data) {}

◆ BooleanDecoderBool() [2/2]

BooleanDecoderBool ( )
inline

Definition at line 463 of file BaseIterator.hpp.

464  : BooleanDecoderBool(nullptr) {}

Member Function Documentation

◆ DecodeTensor()

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

Implements Decoder< bool >.

Definition at line 471 of file BaseIterator.hpp.

472  {
473  const unsigned int size = tensorShape.GetNumElements();
474  std::vector<float> decodedTensor;
475  decodedTensor.reserve(size);
476 
477  for (uint32_t i = 0; i < size; ++i)
478  {
479  this->operator[](i);
480  decodedTensor.emplace_back(*m_Iterator);
481  }
482 
483  return decodedTensor;
484  }

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

◆ Get()

bool Get ( ) const
inlineoverride

Definition at line 466 of file BaseIterator.hpp.

467  {
468  return *m_Iterator;
469  }

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


The documentation for this class was generated from the following file:
armnn::TypedIterator< const uint8_t, Decoder< bool > >::m_Iterator
const uint8_t * m_Iterator
Definition: BaseIterator.hpp:108
armnn::TypedIterator< const uint8_t, Decoder< bool > >::TypedIterator
TypedIterator(const uint8_t *data=nullptr)
Definition: BaseIterator.hpp:69
armnn::TypedIterator< const uint8_t, Decoder< bool > >::operator[]
TypedIterator & operator[](const unsigned int index) override
Definition: BaseIterator.hpp:100
armnn::BooleanDecoderBool::BooleanDecoderBool
BooleanDecoderBool()
Definition: BaseIterator.hpp:463