ArmNN
 22.11
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 ()
 
- 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 498 of file BaseIterator.hpp.

Constructor & Destructor Documentation

◆ BooleanDecoderBool() [1/2]

BooleanDecoderBool ( const uint8_t *  data)
inline

Definition at line 501 of file BaseIterator.hpp.

502  : TypedIterator(data) {}

◆ BooleanDecoderBool() [2/2]

BooleanDecoderBool ( )
inline

Definition at line 504 of file BaseIterator.hpp.

Member Function Documentation

◆ DecodeTensor()

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

Implements Decoder< bool >.

Definition at line 512 of file BaseIterator.hpp.

References TensorShape::GetNumElements(), armnn::IgnoreUnused(), and BaseIterator::operator[]().

514  {
515  IgnoreUnused(isDepthwise);
516 
517  const unsigned int size = tensorShape.GetNumElements();
518  std::vector<float> decodedTensor;
519  decodedTensor.reserve(size);
520 
521  for (uint32_t i = 0; i < size; ++i)
522  {
523  this->operator[](i);
524  decodedTensor.emplace_back(*m_Iterator);
525  }
526 
527  return decodedTensor;
528  }
void IgnoreUnused(Ts &&...)
TypedIterator & operator[](const unsigned int index) override

◆ Get()

bool Get ( ) const
inlineoverridevirtual

Implements Decoder< bool >.

Definition at line 507 of file BaseIterator.hpp.

508  {
509  return *m_Iterator;
510  }

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