ONE - On-device Neural Engine
Loading...
Searching...
No Matches
loco::MatrixEncoder Struct Referenceabstract

Decribe how to build a matrix from a tensor. More...

#include <MatrixCodec.h>

Public Member Functions

virtual ~MatrixEncoder ()=default
 
virtual MatrixShape shape (const TensorShape &shape) const =0
 
virtual TensorIndex value (const MatrixIndex &index) const =0
 

Detailed Description

Decribe how to build a matrix from a tensor.

Let us assume that "enc" is a matrix encoder.

Given a tensor "inp" and its shape "inp.shape", "enc" builds a matrix "out" as follows:

for each valid matrix index (referred to as matrix_idx below) for enc.shape(inp.shape) out.at(matrix_index) = inp.at(enc.value(matrix_index))

Definition at line 42 of file MatrixCodec.h.

Constructor & Destructor Documentation

◆ ~MatrixEncoder()

virtual loco::MatrixEncoder::~MatrixEncoder ( )
virtualdefault

Member Function Documentation

◆ shape()

◆ value()

virtual TensorIndex loco::MatrixEncoder::value ( const MatrixIndex index) const
pure virtual

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