1 #if CONFIG_WLS_CSI_PROC
2 /** @file wls_QR_algorithm.h
3  *
4  * @brief This file contains header for QR math functions
5  *
6  * Copyright 2023-2024 NXP
7  *
8  * SPDX-License-Identifier: BSD-3-Clause
9  *
10  */
11 
12 /************************************************************************
13  * DFW header for QR math functions
14  ************************************************************************/
15 
16 #ifndef WLS_QR_ALGORITHM_H
17 #define WLS_QR_ALGORITHM_H
18 
19 // MAX_MAT_SIZE needs to be >=2*SIG_SUBSP_DIM_MAX
20 #define MAX_MAT_SIZE 16
21 
22 #ifdef ARM_DS5
23 #define SQRTF(x) __sqrt(x)
24 #define FABSF(x) __fabsf(x)
25 #else
26 #define SQRTF(x) sqrtf(x)
27 #define FABSF(x) fabsf(x)
28 #endif
29 
30 // eigen(Shur) decomposition for symmetric matrix, returns eigen vectors in Q
31 int QR_algorithm(float *inMatArr, float *resD, int matSizeN, int low_accuracy);
32 
33 // eigen(Shur) decomposition for unsymmetric matrix, no Q
34 int unsym_QR_algorithm(float *inMatArr, float *resD, int matSizeN);
35 
36 // solves LS using QR
37 void QR_decomposition(float *inMatArr, float *resD, int matSizeN, int matSizeM);
38 
39 void myBackSub(float *Q_MATR, float *R_MATR, float *MAT_OUT, int matSizeN, int matSizeM);
40 
41 #endif
42 
43 #endif /* CONFIG_WLS_CSI_PROC */
44