Adds two matrices.
- Addition of two 3 x 3 matrices
\[
\begin{pmatrix}
a_{1,1} & a_{1,2} & a_{1,3} \\
a_{2,1} & a_{2,2} & a_{2,3} \\
a_{3,1} & a_{3,2} & a_{3,3} \\
\end{pmatrix}
+
\begin{pmatrix}
b_{1,1} & b_{1,2} & b_{1,3} \\
b_{2,1} & b_{2,2} & b_{2,3} \\
b_{3,1} & b_{3,2} & b_{3,3} \\
\end{pmatrix}
=
\begin{pmatrix}
a_{1,1}+b_{1,1} & a_{1,2}+b_{1,2} & a_{1,3}+b_{1,3} \\
a_{2,1}+b_{2,1} & a_{2,2}+b_{2,2} & a_{2,3}+b_{2,3} \\
a_{3,1}+b_{3,1} & a_{3,2}+b_{3,2} & a_{3,3}+b_{3,3} \\
\end{pmatrix}
\]
The functions check to make sure that pSrcA
, pSrcB
, and pDst
have the same number of rows and columns.
◆ arm_mat_add_f16()
Floating-point matrix addition.
- Parameters
-
[in] | pSrcA | points to first input matrix structure |
[in] | pSrcB | points to second input matrix structure |
[out] | pDst | points to output matrix structure |
- Returns
- execution status
◆ arm_mat_add_f32()
Floating-point matrix addition.
- Parameters
-
[in] | pSrcA | points to first input matrix structure |
[in] | pSrcB | points to second input matrix structure |
[out] | pDst | points to output matrix structure |
- Returns
- execution status
◆ arm_mat_add_q15()
Q15 matrix addition.
- Parameters
-
[in] | pSrcA | points to first input matrix structure |
[in] | pSrcB | points to second input matrix structure |
[out] | pDst | points to output matrix structure |
- Returns
- execution status
- Scaling and Overflow Behavior
- The function uses saturating arithmetic. Results outside of the allowable Q15 range [0x8000 0x7FFF] are saturated.
◆ arm_mat_add_q31()
Q31 matrix addition.
- Parameters
-
[in] | pSrcA | points to first input matrix structure |
[in] | pSrcB | points to second input matrix structure |
[out] | pDst | points to output matrix structure |
- Returns
- execution status
- Scaling and Overflow Behavior
- The function uses saturating arithmetic. Results outside of the allowable Q31 range [0x80000000 0x7FFFFFFF] are saturated.