ArmNN
 24.08
QSymm16PerAxisEncoder Class Reference

#include <BaseIterator.hpp>

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

Public Member Functions

 QSymm16PerAxisEncoder (int16_t *data, const std::vector< float > &scale, unsigned int axisFactor, unsigned int axisDimensionality)
 
void Set (float right)
 
float Get () const
 
float GetScale () const
 
- Public Member Functions inherited from PerAxisIterator< int16_t, Encoder< float > >
 PerAxisIterator (int16_t *data=nullptr, unsigned int axisFactor=0, unsigned int axisDimensionality=0)
 
 PerAxisIterator (int16_t *data=nullptr, const armnn::TensorShape &tensorShape=TensorShape(), const unsigned int axis=0)
 
void Reset (void *data) override
 
PerAxisIteratoroperator++ () override
 
PerAxisIteratoroperator+= (const unsigned int increment) override
 
PerAxisIteratoroperator-= (const unsigned int decrement) override
 
PerAxisIteratorSetIndexOnMem (const unsigned int index)
 
PerAxisIteratoroperator[] (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 PerAxisIterator< int16_t, Encoder< float > >
int16_t * m_Iterator
 
int16_t * m_Start
 
unsigned int m_AxisIndex
 
unsigned int m_AxisDimensionality
 
unsigned int m_AxisFactor
 
unsigned int m_Index
 

Detailed Description

Definition at line 913 of file BaseIterator.hpp.

Constructor & Destructor Documentation

◆ QSymm16PerAxisEncoder()

QSymm16PerAxisEncoder ( int16_t *  data,
const std::vector< float > &  scale,
unsigned int  axisFactor,
unsigned int  axisDimensionality 
)
inline

Definition at line 916 of file BaseIterator.hpp.

918  : PerAxisIterator(data, axisFactor, axisDimensionality), m_Scale(scale) {}

Member Function Documentation

◆ Get()

float Get ( ) const
inline

◆ GetScale()

float GetScale ( ) const
inline

Definition at line 931 of file BaseIterator.hpp.

932  {
933  return m_Scale[m_AxisIndex];
934  }

References PerAxisIterator< int16_t, Encoder< float > >::m_AxisIndex.

◆ Set()

void Set ( float  right)
inlinevirtual

Implements Encoder< float >.

Definition at line 920 of file BaseIterator.hpp.

921  {
922  *m_Iterator = armnn::Quantize<int16_t>(right, m_Scale[m_AxisIndex], 0);
923  }

References PerAxisIterator< int16_t, Encoder< float > >::m_AxisIndex, and PerAxisIterator< int16_t, Encoder< float > >::m_Iterator.


The documentation for this class was generated from the following file:
armnn::PerAxisIterator< int16_t, Encoder< float > >::m_AxisIndex
unsigned int m_AxisIndex
Definition: BaseIterator.hpp:788
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::PerAxisIterator< int16_t, Encoder< float > >::m_Iterator
int16_t * m_Iterator
Definition: BaseIterator.hpp:786
armnn::PerAxisIterator< int16_t, Encoder< float > >::PerAxisIterator
PerAxisIterator(int16_t *data=nullptr, unsigned int axisFactor=0, unsigned int axisDimensionality=0)
Definition: BaseIterator.hpp:710