ArmNN
 26.01
Loading...
Searching...
No Matches
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 ()
 
- 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 456 of file BaseIterator.hpp.

Constructor & Destructor Documentation

◆ BooleanDecoderBool() [1/2]

BooleanDecoderBool ( const uint8_t * data)
inline

Definition at line 459 of file BaseIterator.hpp.

460 : TypedIterator(data) {}

◆ BooleanDecoderBool() [2/2]

BooleanDecoderBool ( )
inline

Definition at line 462 of file BaseIterator.hpp.

Member Function Documentation

◆ DecodeTensor()

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

Implements Decoder< bool >.

Definition at line 470 of file BaseIterator.hpp.

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

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

◆ Get()

bool Get ( ) const
inlineoverridevirtual

Implements Decoder< bool >.

Definition at line 465 of file BaseIterator.hpp.

466 {
467 return *m_Iterator;
468 }

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


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