ArmNN
 24.08
QSymm16Encoder Class Reference

#include <BaseIterator.hpp>

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

Public Member Functions

 QSymm16Encoder (int16_t *data, const float scale, const int32_t offset)
 
 QSymm16Encoder (const float scale, const int32_t offset)
 
void Set (float right) override
 
float Get () const override
 
- Public Member Functions inherited from TypedIterator< int16_t, Encoder< float > >
 TypedIterator (int16_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< int16_t, Encoder< float > >
int16_t * m_Iterator
 
int16_t * m_Start
 

Detailed Description

Definition at line 558 of file BaseIterator.hpp.

Constructor & Destructor Documentation

◆ QSymm16Encoder() [1/2]

QSymm16Encoder ( int16_t *  data,
const float  scale,
const int32_t  offset 
)
inline

Definition at line 561 of file BaseIterator.hpp.

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

◆ QSymm16Encoder() [2/2]

QSymm16Encoder ( const float  scale,
const int32_t  offset 
)
inline

Definition at line 564 of file BaseIterator.hpp.

565  : QSymm16Encoder(nullptr, scale, offset) {}

Member Function Documentation

◆ Get()

float Get ( ) const
inlineoverride

Definition at line 572 of file BaseIterator.hpp.

573  {
574  return armnn::Dequantize(*m_Iterator, m_Scale, m_Offset);
575  }

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

◆ Set()

void Set ( float  right)
inlineoverridevirtual

Implements Encoder< float >.

Definition at line 567 of file BaseIterator.hpp.

568  {
569  *m_Iterator = armnn::Quantize<int16_t>(right, m_Scale, m_Offset);
570  }

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


The documentation for this class was generated from the following file:
armnn::TypedIterator< int16_t, Encoder< float > >::m_Iterator
int16_t * m_Iterator
Definition: BaseIterator.hpp:107
armnn::TypedIterator< int16_t, Encoder< float > >::TypedIterator
TypedIterator(int16_t *data=nullptr)
Definition: BaseIterator.hpp:68
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:48
armnn::QSymm16Encoder::QSymm16Encoder
QSymm16Encoder(int16_t *data, const float scale, const int32_t offset)
Definition: BaseIterator.hpp:561