ArmNN
 24.02
Float32Decoder Class Reference

#include <BaseIterator.hpp>

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

Public Member Functions

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

Additional Inherited Members

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

Detailed Description

Definition at line 283 of file BaseIterator.hpp.

Constructor & Destructor Documentation

◆ Float32Decoder() [1/2]

Float32Decoder ( const float *  data)
inline

Definition at line 286 of file BaseIterator.hpp.

287  : TypedIterator(data) {}

◆ Float32Decoder() [2/2]

Float32Decoder ( )
inline

Definition at line 289 of file BaseIterator.hpp.

290  : Float32Decoder(nullptr) {}

Member Function Documentation

◆ DecodeTensor()

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

Implements Decoder< float >.

Definition at line 296 of file BaseIterator.hpp.

297  {
298  const unsigned int size = tensorShape.GetNumElements();
299  std::vector<float> decodedTensor;
300 
301  decodedTensor.reserve(size);
302  decodedTensor.assign(m_Start, m_Start + size);
303 
304  return decodedTensor;
305  }

References TensorShape::GetNumElements(), and TypedIterator< const float, Decoder< float > >::m_Start.

◆ Get()

float Get ( ) const
inlineoverride

Definition at line 292 of file BaseIterator.hpp.

293  {
294  return *m_Iterator;
295  }

References TypedIterator< const float, Decoder< float > >::m_Iterator.


The documentation for this class was generated from the following file:
armnn::TypedIterator< const float, Decoder< float > >::m_Iterator
const float * m_Iterator
Definition: BaseIterator.hpp:108
armnn::TypedIterator< const float, Decoder< float > >::TypedIterator
TypedIterator(const float *data=nullptr)
Definition: BaseIterator.hpp:69
armnn::TypedIterator< const float, Decoder< float > >::m_Start
const float * m_Start
Definition: BaseIterator.hpp:109
armnn::Float32Decoder::Float32Decoder
Float32Decoder()
Definition: BaseIterator.hpp:289