|
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...
|
|
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.
◆ 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] | aOutMat | pointer of the output vector |
[in] | aInMat | pointer of the input matrix |
[in] | aInVec | pointer of the input vector |
[in] | aRow | number of rows in the matrix |
[in] | aCol | number 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] | aOutMat | pointer of the output vector |
[in] | aInMat | pointer of the input matrix |
[in] | aInVec | pointer of the input vector |
[in] | aRow | number of rows in the matrix |
[in] | aCol | number 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] | aOutMat | pointer of the output vector |
[in] | aInMat | pointer of the input matrix |
[in] | aInVec | pointer of the input vector |
[in] | aRow | number of rows in the matrix |
[in] | aCol | number 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] | aOutMat | pointer of the output vector |
[in] | aInMat | pointer of the input matrix |
[in] | aInVec | pointer of the input vector |
[in] | aRow | number of rows in the matrix |
[in] | aCol | number of columns in the matrix and the elements size of vector |