ArmNN
 25.11
Loading...
Searching...
No Matches
Int32ToInt32tDecoder Class Reference

#include <BaseIterator.hpp>

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

Public Member Functions

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

Additional Inherited Members

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

Detailed Description

Definition at line 369 of file BaseIterator.hpp.

Constructor & Destructor Documentation

◆ Int32ToInt32tDecoder() [1/2]

Int32ToInt32tDecoder ( const int32_t * data)
inline

Definition at line 372 of file BaseIterator.hpp.

373 : TypedIterator(data){}

References TypedIterator< const int32_t, Decoder< int32_t > >::TypedIterator().

Referenced by Int32ToInt32tDecoder().

◆ Int32ToInt32tDecoder() [2/2]

Definition at line 375 of file BaseIterator.hpp.

376 : Int32ToInt32tDecoder(nullptr) {}

References Int32ToInt32tDecoder().

Member Function Documentation

◆ DecodeTensor()

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

Implements Decoder< int32_t >.

Definition at line 382 of file BaseIterator.hpp.

383 {
384 const unsigned int size = tensorShape.GetNumElements();
385 std::vector<float> decodedTensor;
386 decodedTensor.reserve(size);
387
388 for (uint32_t i = 0; i < size; ++i)
389 {
390 this->operator[](i);
391 decodedTensor.emplace_back(static_cast<float>(*m_Iterator));
392 }
393
394 return decodedTensor;
395 }

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

◆ Get()

int32_t Get ( ) const
inlineoverridevirtual

Implements Decoder< int32_t >.

Definition at line 378 of file BaseIterator.hpp.

379 {
380 return *m_Iterator;
381 }

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


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