ArmNN
 23.02
BooleanDecoderBool Class Reference

#include <BaseIterator.hpp>

Inheritance diagram for BooleanDecoderBool:
TypedIterator< const uint8_t, Decoder< bool > > Decoder< bool > BaseIterator

Public Member Functions

 BooleanDecoderBool (const uint8_t *data)
 
 BooleanDecoderBool ()
 
bool Get () const override
 
std::vector< float > DecodeTensor (const TensorShape &tensorShape, const bool isDepthwise) 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 460 of file BaseIterator.hpp.

Constructor & Destructor Documentation

◆ BooleanDecoderBool() [1/2]

BooleanDecoderBool ( const uint8_t *  data)
inline

Definition at line 463 of file BaseIterator.hpp.

464  : TypedIterator(data) {}

◆ BooleanDecoderBool() [2/2]

BooleanDecoderBool ( )
inline

Definition at line 466 of file BaseIterator.hpp.

467  : BooleanDecoderBool(nullptr) {}

Member Function Documentation

◆ DecodeTensor()

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

Implements Decoder< bool >.

Definition at line 474 of file BaseIterator.hpp.

476  {
477  IgnoreUnused(isDepthwise);
478 
479  const unsigned int size = tensorShape.GetNumElements();
480  std::vector<float> decodedTensor;
481  decodedTensor.reserve(size);
482 
483  for (uint32_t i = 0; i < size; ++i)
484  {
485  this->operator[](i);
486  decodedTensor.emplace_back(*m_Iterator);
487  }
488 
489  return decodedTensor;
490  }

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

◆ Get()

bool Get ( ) const
inlineoverride

Definition at line 469 of file BaseIterator.hpp.

470  {
471  return *m_Iterator;
472  }

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


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