ONE - On-device Neural Engine
Loading...
Searching...
No Matches
mir::TensorType Class Referencefinal

#include <TensorType.h>

Public Member Functions

 TensorType ()=default
 
 TensorType (DataType element_type, const Shape &shape)
 
 TensorType (DataType element_type, const Shape &shape, const AffineQuantization &quant)
 
DataType getElementType () const
 
const ShapegetShape () const
 
const AffineQuantizationgetQuantization () const
 
void setQuantization (const AffineQuantization &quant)
 
bool isQuantized () const
 

Detailed Description

Definition at line 27 of file TensorType.h.

Constructor & Destructor Documentation

◆ TensorType() [1/3]

mir::TensorType::TensorType ( )
default

◆ TensorType() [2/3]

mir::TensorType::TensorType ( DataType  element_type,
const Shape shape 
)
inline

Definition at line 32 of file TensorType.h.

32 : _element_type(element_type), _shape(shape)
33 {
34 }

◆ TensorType() [3/3]

mir::TensorType::TensorType ( DataType  element_type,
const Shape shape,
const AffineQuantization quant 
)
inline

Definition at line 36 of file TensorType.h.

37 : _element_type(element_type), _shape(shape), _quantization(quant)
38 {
39 }

Member Function Documentation

◆ getElementType()

DataType mir::TensorType::getElementType ( ) const
inline

◆ getQuantization()

const AffineQuantization & mir::TensorType::getQuantization ( ) const
inline

Definition at line 45 of file TensorType.h.

45{ return _quantization; }

Referenced by mir_interpreter::Dequantize().

◆ getShape()

const Shape & mir::TensorType::getShape ( ) const
inline

Definition at line 43 of file TensorType.h.

43{ return _shape; }

Referenced by mir::TensorVariant::getShape().

◆ isQuantized()

bool mir::TensorType::isQuantized ( ) const
inline

Definition at line 47 of file TensorType.h.

47{ return !_quantization.empty(); }

References mir::AffineQuantization::empty().

Referenced by mir_interpreter::Dequantize().

◆ setQuantization()

void mir::TensorType::setQuantization ( const AffineQuantization quant)
inline

Definition at line 46 of file TensorType.h.

46{ _quantization = quant; }

Referenced by nnc::ConstantFoldTranspose::run(), and mir::transposeTensor().


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