LIBML  Version 3.2.4
LIBML DSP Software Library
Functions
Matrix Multiplies Vector
Collaboration diagram for Matrix Multiplies Vector:

Functions

void tpt_mat_mul_mxv_f32 (f32_t *aOutMat, const f32_t *aInMat, const f32_t *aInVec, uint32_t aRow, uint32_t aCol)
 Matrix multiply vector for f32 formats. More...
 
void tpt_mat_mul_mxv_q7 (q7_t *aOutMat, const q7_t *aInMat, const q7_t *aInVec, uint32_t aRow, uint32_t aCol)
 Matrix multiply vector for q7 formats. More...
 
void tpt_mat_mul_mxv_q15 (q15_t *aOutMat, const q15_t *aInMat, const q15_t *aInVec, uint32_t aRow, uint32_t aCol)
 Matrix multiply vector for q15 formats. More...
 
void tpt_mat_mul_mxv_q31 (q31_t *aOutMat, const q31_t *aInMat, const q31_t *aInVec, uint32_t aRow, uint32_t aCol)
 Matrix multiply vector for q31 formats. More...
 

Detailed Description

Example

  The following equation shows the matrix A multiplied with a vector B:

  
Given each element with a value, the result is like
and can be presented in code as follows: #define aRow 2 #define aCol 3 f32_t aInMat[aRow * aCol] = {0.1, -0.1, 0.1, 0.2, -0.2, 0.3}; f32_t aInVec[aCol] = {0.2, -0.1, -0.7}; f32_t aOutMat[aRow]; tpt_mat_mul_mxv_f32 (aOutMat, aInMat, aInVec, aRow, aCol); This example also serves as a reference for examples of Q31, Q15 or Q7 functions.

Function Documentation

◆ tpt_mat_mul_mxv_f32()

void tpt_mat_mul_mxv_f32 ( f32_t aOutMat,
const f32_t aInMat,
const f32_t aInVec,
uint32_t  aRow,
uint32_t  aCol 
)

Matrix multiply vector for f32 formats.

Parameters
[out]aOutMatpointer of the output vector
[in]aInMatpointer of the input matrix
[in]aInVecpointer of the input vector
[in]aRownumber of rows in the matrix
[in]aColnumber of columns in the matrix and the elements size of vector

◆ tpt_mat_mul_mxv_q15()

void tpt_mat_mul_mxv_q15 ( q15_t aOutMat,
const q15_t aInMat,
const q15_t aInVec,
uint32_t  aRow,
uint32_t  aCol 
)

Matrix multiply vector for q15 formats.

Parameters
[out]aOutMatpointer of the output vector
[in]aInMatpointer of the input matrix
[in]aInVecpointer of the input vector
[in]aRownumber of rows in the matrix
[in]aColnumber of columns in the matrix and the elements size of vector

◆ tpt_mat_mul_mxv_q31()

void tpt_mat_mul_mxv_q31 ( q31_t aOutMat,
const q31_t aInMat,
const q31_t aInVec,
uint32_t  aRow,
uint32_t  aCol 
)

Matrix multiply vector for q31 formats.

Parameters
[out]aOutMatpointer of the output vector
[in]aInMatpointer of the input matrix
[in]aInVecpointer of the input vector
[in]aRownumber of rows in the matrix
[in]aColnumber of columns in the matrix and the elements size of vector

◆ tpt_mat_mul_mxv_q7()

void tpt_mat_mul_mxv_q7 ( q7_t aOutMat,
const q7_t aInMat,
const q7_t aInVec,
uint32_t  aRow,
uint32_t  aCol 
)

Matrix multiply vector for q7 formats.

Parameters
[out]aOutMatpointer of the output vector
[in]aInMatpointer of the input matrix
[in]aInVecpointer of the input vector
[in]aRownumber of rows in the matrix
[in]aColnumber of columns in the matrix and the elements size of vector