matrix inversion
Module: Matrix Functions
Modules
Name |
---|
matrix inversion kernels |
Functions
Name | |
---|---|
int | plp_mat_inv_f32(float restrict pSrc, float restrict pDst, uint32_t N) Glue code for matrix inversion of 32-bit floating-point matrices. |
int | plp_mat_inv_f32_parallel(float restrict pSrc, float restrict pDst, uint32_t N, uint32_t nPE) Glue code for parallel matrix inversion of 32-bit floating-point matrices. |
Detailed Description
Par: Algorithm
The Gauss-Jordan method is used to find the inverse. The algorithm performs a sequence of elementary row-operations until it reduces the input matrix to an identity matrix. Applying the same sequence of elementary row-operations to an identity matrix yields the inverse matrix.
This module contains the glue code for matrix inversion. The kernel codes (kernels) are in the Module matrix inversion Kernels.
The inverse of a matrix of shape MxN is another matrix of shape NxN, such that
[ I = A \cdot A^{-1} ]The inverse is defined only if the input matrix is square and non-singular (the determinant is non-zero). The function checks that the input and output matrices are square and of the same size. Matrix inversion is numerically sensitive and the PULP DSP library only supports matrix inversion of floating-point matrices.
Functions Documentation
function plp_mat_inv_f32
int plp_mat_inv_f32(
float *__restrict__ pSrc,
float *__restrict__ pDst,
uint32_t N
)
Glue code for matrix inversion of 32-bit floating-point matrices.
Parameters:
- pSrc Points to the input matrix. pSrc is modified by this function
- N Width and height of both matrices
- pDst Points to the output matrix
Return: 0: Success, 1: Matrix is singular, 2: operation not supported
Par: This function will use plp_mat_inv_i32s_xpulpv2 for its computation.
Glue code for matrix inverse of a 32-bit floating-point matrices.
function plp_mat_inv_f32_parallel
int plp_mat_inv_f32_parallel(
float *__restrict__ pSrc,
float *__restrict__ pDst,
uint32_t N,
uint32_t nPE
)
Glue code for parallel matrix inversion of 32-bit floating-point matrices.
Parameters:
- pSrc Points to the input matrix, pSrc is modified by this function
- N Width and height of both matrices
- nPE Number of cores to use for computation
- pDst Points to the output matrix
Return: 0: Success, 1: Matrix is singular, 2: operation not supported
Glue code for parallel matrix inverse of a 32-bit floating-point matrices.
@warn This function is not yet implemented in parallel, and it will call the single-core implementation!
Updated on 2023-03-01 at 16:16:32 +0000