ArmNN
 20.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 unsigned int channelMultiplier, 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
 
TypedIteratorSetIndex (unsigned int index, unsigned int axisIndex=0) 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 518 of file BaseIterator.hpp.

Constructor & Destructor Documentation

◆ BooleanDecoderBool() [1/2]

BooleanDecoderBool ( const uint8_t *  data)
inline

Definition at line 521 of file BaseIterator.hpp.

522  : TypedIterator(data) {}

◆ BooleanDecoderBool() [2/2]

BooleanDecoderBool ( )
inline

Definition at line 524 of file BaseIterator.hpp.

Member Function Documentation

◆ DecodeTensor()

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

Implements Decoder< bool >.

Definition at line 532 of file BaseIterator.hpp.

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

535  {
536  IgnoreUnused(channelMultiplier, isDepthwise);
537 
538  const unsigned int size = tensorShape.GetNumElements();
539  std::vector<float> decodedTensor;
540  decodedTensor.reserve(size);
541 
542  for (uint32_t i = 0; i < size; ++i)
543  {
544  this->operator[](i);
545  decodedTensor.emplace_back(*m_Iterator);
546  }
547 
548  return decodedTensor;
549  }
void IgnoreUnused(Ts &&...)
TypedIterator & operator[](const unsigned int index) override

◆ Get()

bool Get ( ) const
inlineoverridevirtual

Implements Decoder< bool >.

Definition at line 527 of file BaseIterator.hpp.

528  {
529  return *m_Iterator;
530  }

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