ArmNN
 24.02
QASymm8Encoder Class Reference

#include <BaseIterator.hpp>

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

Public Member Functions

 QASymm8Encoder (uint8_t *data, const float scale, const int32_t offset)
 
 QASymm8Encoder (const float scale, const int32_t offset)
 
void Set (float right) override
 
float Get () const override
 
- Public Member Functions inherited from TypedIterator< uint8_t, Encoder< float > >
 TypedIterator (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 Encoder< float >
 Encoder ()
 
virtual ~Encoder ()
 
virtual float Get () const=0
 
- Public Member Functions inherited from BaseIterator
 BaseIterator ()
 
virtual ~BaseIterator ()
 

Additional Inherited Members

- Protected Attributes inherited from TypedIterator< uint8_t, Encoder< float > >
uint8_t * m_Iterator
 
uint8_t * m_Start
 

Detailed Description

Definition at line 487 of file BaseIterator.hpp.

Constructor & Destructor Documentation

◆ QASymm8Encoder() [1/2]

QASymm8Encoder ( uint8_t *  data,
const float  scale,
const int32_t  offset 
)
inline

Definition at line 490 of file BaseIterator.hpp.

491  : TypedIterator(data), m_Scale(scale), m_Offset(offset) {}

◆ QASymm8Encoder() [2/2]

QASymm8Encoder ( const float  scale,
const int32_t  offset 
)
inline

Definition at line 493 of file BaseIterator.hpp.

494  : QASymm8Encoder(nullptr, scale, offset) {}

Member Function Documentation

◆ Get()

float Get ( ) const
inlineoverride

Definition at line 501 of file BaseIterator.hpp.

502  {
503  return armnn::Dequantize(*m_Iterator, m_Scale, m_Offset);
504  }

References armnn::Dequantize(), and TypedIterator< uint8_t, Encoder< float > >::m_Iterator.

◆ Set()

void Set ( float  right)
inlineoverridevirtual

Implements Encoder< float >.

Definition at line 496 of file BaseIterator.hpp.

497  {
498  *m_Iterator = armnn::Quantize<uint8_t>(right, m_Scale, m_Offset);
499  }

References TypedIterator< uint8_t, Encoder< float > >::m_Iterator.


The documentation for this class was generated from the following file:
armnn::TypedIterator< uint8_t, Encoder< float > >::m_Iterator
uint8_t * m_Iterator
Definition: BaseIterator.hpp:108
armnn::TypedIterator< uint8_t, Encoder< float > >::TypedIterator
TypedIterator(uint8_t *data=nullptr)
Definition: BaseIterator.hpp:69
armnn::QASymm8Encoder::QASymm8Encoder
QASymm8Encoder(uint8_t *data, const float scale, const int32_t offset)
Definition: BaseIterator.hpp:490
armnn::Dequantize
float Dequantize(QuantizedType value, float scale, int32_t offset)
Dequantize an 8-bit data type into a floating point data type.
Definition: TypesUtils.cpp:52