ArmNN
 24.08
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 282 of file BaseIterator.hpp.

Constructor & Destructor Documentation

◆ Float32Decoder() [1/2]

Float32Decoder ( const float *  data)
inline

Definition at line 285 of file BaseIterator.hpp.

286  : TypedIterator(data) {}

◆ Float32Decoder() [2/2]

Float32Decoder ( )
inline

Definition at line 288 of file BaseIterator.hpp.

289  : Float32Decoder(nullptr) {}

Member Function Documentation

◆ DecodeTensor()

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

Implements Decoder< float >.

Definition at line 295 of file BaseIterator.hpp.

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

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

◆ Get()

float Get ( ) const
inlineoverride

Definition at line 291 of file BaseIterator.hpp.

292  {
293  return *m_Iterator;
294  }

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:107
armnn::TypedIterator< const float, Decoder< float > >::TypedIterator
TypedIterator(const float *data=nullptr)
Definition: BaseIterator.hpp:68
armnn::TypedIterator< const float, Decoder< float > >::m_Start
const float * m_Start
Definition: BaseIterator.hpp:108
armnn::Float32Decoder::Float32Decoder
Float32Decoder()
Definition: BaseIterator.hpp:288