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

Functions

void tpt_mat_sub_f32 (f32_t *aOutMat, const f32_t *aInMatA, const f32_t *aInMatB, uint16_t aRows, uint16_t aCols)
 Floating-point matrix subtraction. More...
 
void tpt_mat_sub_f64 (f64_t *aOutMat, const f64_t *aInMatA, const f64_t *aInMatB, uint16_t aRows, uint16_t aCols)
 Floating-point matrix subtraction. More...
 
void tpt_mat_sub_q15 (q15_t *aOutMat, const q15_t *aInMatA, const q15_t *aInMatB, uint16_t aRows, uint16_t aCols)
 Q15 matrix subtraction. More...
 
void tpt_mat_sub_q31 (q31_t *aOutMat, const q31_t *aInMatA, const q31_t *aInMatB, uint16_t aRows, uint16_t aCols)
 Q31 matrix subtraction. More...
 

Detailed Description

Subtract two matrices.

Subtraction of two 3 x 3 matrices

The caller should ensure that aOutMat, aInMatA and aInMatB have the have the same number of rows and columns. There are separate functions for floating-point, Q15, and Q31 data types.

Function Documentation

◆ tpt_mat_sub_f32()

void tpt_mat_sub_f32 ( f32_t aOutMat,
const f32_t aInMatA,
const f32_t aInMatB,
uint16_t  aRows,
uint16_t  aCols 
)

Floating-point matrix subtraction.

Parameters
[out]aOutMatpoints to output matrix
[in]aInMatApoints to first input matrix
[in]aInMatBpoints to second input matrix
[in]aRowsrows of matrix
[in]aColscolumns of matrix
Returns
none

◆ tpt_mat_sub_f64()

void tpt_mat_sub_f64 ( f64_t aOutMat,
const f64_t aInMatA,
const f64_t aInMatB,
uint16_t  aRows,
uint16_t  aCols 
)

Floating-point matrix subtraction.

Parameters
[out]aOutMatpoints to output matrix
[in]aInMatApoints to first input matrix
[in]aInMatBpoints to second input matrix
[in]aRowsrows of matrix
[in]aColscolumns of matrix
Returns
none

◆ tpt_mat_sub_q15()

void tpt_mat_sub_q15 ( q15_t aOutMat,
const q15_t aInMatA,
const q15_t aInMatB,
uint16_t  aRows,
uint16_t  aCols 
)

Q15 matrix subtraction.

Parameters
[out]aOutMatpoints to output matrix
[in]aInMatApoints to first input matrix
[in]aInMatBpoints to second input matrix
[in]aRowsrows of matrix
[in]aColscolumns of matrix
Returns
none
Scaling and Overflow Behavior
The function uses saturating arithmetic. Results outside of the allowable Q15 range [0x8000 0x7FFF] are saturated.

◆ tpt_mat_sub_q31()

void tpt_mat_sub_q31 ( q31_t aOutMat,
const q31_t aInMatA,
const q31_t aInMatB,
uint16_t  aRows,
uint16_t  aCols 
)

Q31 matrix subtraction.

Parameters
[out]aOutMatpoints to output matrix
[in]aInMatApoints to first input matrix
[in]aInMatBpoints to second input matrix
[in]aRowsrows of matrix
[in]aColscolumns of matrix
Returns
none
Scaling and Overflow Behavior
The function uses saturating arithmetic. Results outside of the allowable Q31 range [0x80000000 0x7FFFFFFF] are saturated.