# Matrix Computations - enum FadasCompMat\_ZGEMMMethod - ZGEMM method to be performed. C = alpha \* op(A) \* op(B) + beta \* C. *Values:* - enumerator FADAS\_COMPMATRIX\_NOOP\_HERM - - enumerator FADAS\_COMPMATRIX\_HERM\_NOOP - For ZGEMM operation with op(A) = A, op(B) = B\*. - enumerator FADAS\_COMPMATRIX\_HERM\_HERM - For ZGEMM operation with op(A) = A\*, op(B) = B. - enumerator FADAS\_COMPMATRIX\_NOOP\_NOOP - For ZGEMM operation with op(A) = A\*, op(B) = B\*. - typedef struct [FadasCompMatrixf32](https://docs.qualcomm.com/doc/80-63309-1/topic/struct_fadas_comp_matrixf32.html#_CPPv418FadasCompMatrixf32) FadasCompMatrixf32\_t - Matrix structure with fp32 input data. - Param plane: - Array with pointers to fp32 input data - Param numRows: - Number of rows in a matrix - Param numCols: - Number of columns in a matrix. - Param Stride: - Number of bytes between the two rows of a matrix. - Param numPlanes: - Number of planes in a matrix - typedef struct [FadasCompMatrixf16](https://docs.qualcomm.com/doc/80-63309-1/topic/struct_fadas_comp_matrixf16.html#_CPPv418FadasCompMatrixf16) FadasCompMatrixf16\_t - Matrix structure with fp16 data. - Param plane: - Array with pointers to fp16 input data - Param numRows: - Number of rows in a matrix - Param numCols: - Number of columns in a matrix. - Param Stride: - Number of bytes between the two rows of a matrix. - Param numPlanes: - Number of planes in a matrix - typedef struct [FadasCompVectorf32](https://docs.qualcomm.com/doc/80-63309-1/topic/struct_fadas_comp_vectorf32.html#_CPPv418FadasCompVectorf32) FadasCompVectorf32\_t - Complex vector structure. - Param len: - Length of a vector - Param plane: - Array with pointers to the planes of a vectors - Param numPlanes: - Number of planes in a vector - typedef enum [FadasCompMat\_ZGEMMMethod](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_group__matrix__comp_1ga2503bc8a05d99bf94b5e2612387179b6.html#_CPPv424FadasCompMat_ZGEMMMethod) FadasCompMat\_ZGEMMMethod\_e - ZGEMM method to be performed. C = alpha \* op(A) \* op(B) + beta \* C. - [FadasError\_e](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#_CPPv412FadasError_e) FadasCompMat\_Init(const char \*licenseKey) - Initialize FastADAS Linear Algebra Complex Matrix feature. **WARNING:** Must be called once before other FastADAS functions except [FadasVersion()](https://docs.qualcomm.com/doc/80-63309-1/topic/misc.html#group__misc_1ga55cbdff48d751f2a0227ae4ac106d746). - Parameters: - **licenseKey** – Pointer to the license key string. - Returns: - [FADAS\_ERROR\_NONE](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#fadas_8h_1a280abf443019bfc722ac1158e5fe1013aea09a4171f0866f38326d7e5323f2d12) — Success. - [FadasError\_e](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#_CPPv412FadasError_e) FadasCompMat\_DeInit(void) - Deinitialize FastADAS Linear Algebra Complex Matrix feature. **WARNING:** Must be called once after all other FastADAS functions. - [FadasError\_e](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#_CPPv412FadasError_e) FadasCompMat\_SetIdentity([FadasCompMatrixf32\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/typedef_group__matrix__comp_1ga85de7611aa474ce17ac23f6f667661b0.html#_CPPv420FadasCompMatrixf32_t) \*matI) - Generate complex Identity matrix of size n x n with 32-bit float data. - Parameters: - **matI** – Pointer to Identity Matrix - Returns: - [FADAS\_ERROR\_NONE](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#fadas_8h_1a280abf443019bfc722ac1158e5fe1013aea09a4171f0866f38326d7e5323f2d12) : Success - [FadasError\_e](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#_CPPv412FadasError_e) FadasCompMat\_SetRev([FadasCompMatrixf32\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/typedef_group__matrix__comp_1ga85de7611aa474ce17ac23f6f667661b0.html#_CPPv420FadasCompMatrixf32_t) \*matRev) - Generate complex Reversal matrix of size n x n with 32-bit float data. - Parameters: - **matRev** – Pointer to Reversal Matrix - Returns: - [FADAS\_ERROR\_NONE](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#fadas_8h_1a280abf443019bfc722ac1158e5fe1013aea09a4171f0866f38326d7e5323f2d12) : Success - [FadasError\_e](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#_CPPv412FadasError_e) FadasCompMat\_HermitianTranspose(const [FadasCompMatrixf32\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/typedef_group__matrix__comp_1ga85de7611aa474ce17ac23f6f667661b0.html#_CPPv420FadasCompMatrixf32_t) \*matIn, [FadasCompMatrixf32\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/typedef_group__matrix__comp_1ga85de7611aa474ce17ac23f6f667661b0.html#_CPPv420FadasCompMatrixf32_t) \*matOut) - Generate Hermitian Transpose of Input Complex Matrix with 32-bit float data. - Parameters: - - **matIn** – Pointer to Input Matrix - **matOut** – Pointer to Output Matrix - Returns: - [FADAS\_ERROR\_NONE](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#fadas_8h_1a280abf443019bfc722ac1158e5fe1013aea09a4171f0866f38326d7e5323f2d12) : Success - [FadasCompMat\_ZGEMM\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/typedef_fadas_comp_matrix_8h_1a7ef3fd9d199128a7af62240494aa4ff6.html#_CPPv420FadasCompMat_ZGEMM_t) \*FadasCompMat\_ZGEMM\_Create(const [FadasCompMat\_ZGEMMMethod\_e](https://docs.qualcomm.com/doc/80-63309-1/topic/typedef_group__matrix__comp_1ga94b3ace8fa7e0a270f2f90d02f22009b.html#_CPPv426FadasCompMat_ZGEMMMethod_e) method, const [FadasCompMatrixf32\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/typedef_group__matrix__comp_1ga85de7611aa474ce17ac23f6f667661b0.html#_CPPv420FadasCompMatrixf32_t) \*matA, const [FadasCompMatrixf32\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/typedef_group__matrix__comp_1ga85de7611aa474ce17ac23f6f667661b0.html#_CPPv420FadasCompMatrixf32_t) \*matB) - Generates a pointer to structure with required memory to be allocated. - Parameters: - - **method** – enum to determine op(A) and op(B) for ZGEMM - **matA** – Pointer to matrix A in ZGEMM - **matB** – Pointer to matrix B in ZGEMM - Returns: - nullptr : Failure void pointer : Success - [FadasError\_e](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#_CPPv412FadasError_e) FadasCompMat\_ZGEMM\_Run([FadasCompMat\_ZGEMM\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/typedef_fadas_comp_matrix_8h_1a7ef3fd9d199128a7af62240494aa4ff6.html#_CPPv420FadasCompMat_ZGEMM_t) \*hZGEMM, const [FadasCompMat\_ZGEMMMethod\_e](https://docs.qualcomm.com/doc/80-63309-1/topic/typedef_group__matrix__comp_1ga94b3ace8fa7e0a270f2f90d02f22009b.html#_CPPv426FadasCompMat_ZGEMMMethod_e) method, const [float32\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/typedef_fadas_8h_1a4611b605e45ab401f02cab15c5e38715.html#_CPPv49float32_t) alpha, const [float32\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/typedef_fadas_8h_1a4611b605e45ab401f02cab15c5e38715.html#_CPPv49float32_t) beta, const [FadasCompMatrixf32\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/typedef_group__matrix__comp_1ga85de7611aa474ce17ac23f6f667661b0.html#_CPPv420FadasCompMatrixf32_t) \*matA, const [FadasCompMatrixf32\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/typedef_group__matrix__comp_1ga85de7611aa474ce17ac23f6f667661b0.html#_CPPv420FadasCompMatrixf32_t) \*matB, [FadasCompMatrixf32\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/typedef_group__matrix__comp_1ga85de7611aa474ce17ac23f6f667661b0.html#_CPPv420FadasCompMatrixf32_t) \*matC) - Perform the Operation ( C = alpha \* op(A) \* op(B) + beta \* C ) - Parameters: - - **hZGEMM** – ZGEMM handle - **method** – Method to determine op(A) and op(B) - **alpha** – Scalar to be multiplied with op(A) \* op(B) - **beta** – Scalar to be multiplied with C - **matA** – Pointer to the matrix structure with matrix A’s data - **matB** – Pointer to the matrix structure with matrix B’s data - **matC** – Pointer to the matrix structure with matrix C’s data - Returns: - [FADAS\_ERROR\_NONE](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#fadas_8h_1a280abf443019bfc722ac1158e5fe1013aea09a4171f0866f38326d7e5323f2d12) : Success Appropriate error code : Failure - [FadasError\_e](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#_CPPv412FadasError_e) FadasCompMat\_ZGEMM\_Destroy([FadasCompMat\_ZGEMM\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/typedef_fadas_comp_matrix_8h_1a7ef3fd9d199128a7af62240494aa4ff6.html#_CPPv420FadasCompMat_ZGEMM_t) \*hZGEMM) - Function to free the buffers allocated in FadasCompMat\_ZGEMM\_Create. - Parameters: - **hZGEMM** – ZGEMM handle - Returns: - [FADAS\_ERROR\_NONE](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#fadas_8h_1a280abf443019bfc722ac1158e5fe1013aea09a4171f0866f38326d7e5323f2d12) : Success Appropriate error code : Failure - [FadasCompMat\_EVD\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/typedef_fadas_comp_matrix_8h_1a356eac9b4cf0e80efde059fa9fde8d2e.html#_CPPv418FadasCompMat_EVD_t) \*FadasCompMat\_EVD\_Create(const [FadasCompMatrixf32\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/typedef_group__matrix__comp_1ga85de7611aa474ce17ac23f6f667661b0.html#_CPPv420FadasCompMatrixf32_t) \*matA) - Generates a pointer to structure with required memory to be allocated. - Parameters: - **matA** – input matrix - Returns: - nullptr : Failure FadasCompMat\_EVD\_t pointer : Success - [FadasError\_e](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#_CPPv412FadasError_e) FadasCompMat\_EVD\_Run([FadasCompMat\_EVD\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/typedef_fadas_comp_matrix_8h_1a356eac9b4cf0e80efde059fa9fde8d2e.html#_CPPv418FadasCompMat_EVD_t) \*hEVD, const [FadasCompMatrixf32\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/typedef_group__matrix__comp_1ga85de7611aa474ce17ac23f6f667661b0.html#_CPPv420FadasCompMatrixf32_t) \*matA, [FadasCompVectorf32\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/typedef_group__matrix__comp_1ga7c5a149f9ad4408e7f048b0bd3691d33.html#_CPPv420FadasCompVectorf32_t) \*vecEigenVal, [FadasCompMatrixf32\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/typedef_group__matrix__comp_1ga85de7611aa474ce17ac23f6f667661b0.html#_CPPv420FadasCompMatrixf32_t) \*matEigenVec) - Function to find eigen values and eigen vectors of a matrix. - Parameters: - - **hEVD** – EVD handle - **matA** – Pointer to the matrix structure with input matrix data - **vecEigenVal** – Pointer to the vector structure with Eigen Values of matA - **matEigenVec** – Pointer to the matrix structure with Eigen Vectors of matA - Returns: - [FADAS\_ERROR\_NONE](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#fadas_8h_1a280abf443019bfc722ac1158e5fe1013aea09a4171f0866f38326d7e5323f2d12) : Success Appropriate error code : Failure - [FadasError\_e](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#_CPPv412FadasError_e) FadasCompMat\_EVD\_Destroy([FadasCompMat\_EVD\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/typedef_fadas_comp_matrix_8h_1a356eac9b4cf0e80efde059fa9fde8d2e.html#_CPPv418FadasCompMat_EVD_t) \*hEVD) - Function to free the buffers allocated in FadasCompMat\_EVD\_Create. - Parameters: - **hEVD** – EVD Handle - Returns: - [FADAS\_ERROR\_NONE](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#fadas_8h_1a280abf443019bfc722ac1158e5fe1013aea09a4171f0866f38326d7e5323f2d12) : Success Appropriate error code : Failure - struct FadasCompMatrixf32 - Matrix structure with fp32 input data. - Param plane: - Array with pointers to fp32 input data - Param numRows: - Number of rows in a matrix - Param numCols: - Number of columns in a matrix. - Param Stride: - Number of bytes between the two rows of a matrix. - Param numPlanes: - Number of planes in a matrix Public Members - [float32\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/typedef_fadas_8h_1a4611b605e45ab401f02cab15c5e38715.html#_CPPv49float32_t) \*plane[FADAS\_NUM\_COMPMAT\_PLANES] - - uint32\_t numRows - - uint32\_t numCols - - uint32\_t stride - - uint32\_t numPlanes - - struct FadasCompMatrixf16 - Matrix structure with fp16 data. - Param plane: - Array with pointers to fp16 input data - Param numRows: - Number of rows in a matrix - Param numCols: - Number of columns in a matrix. - Param Stride: - Number of bytes between the two rows of a matrix. - Param numPlanes: - Number of planes in a matrix Public Members - float16\_t \*plane[FADAS\_NUM\_COMPMAT\_PLANES] - - uint32\_t numRows - - uint32\_t numCols - - uint32\_t stride - - uint32\_t numPlanes - - struct FadasCompVectorf32 - Complex vector structure. - Param len: - Length of a vector - Param plane: - Array with pointers to the planes of a vectors - Param numPlanes: - Number of planes in a vector Public Members - uint32\_t len - - [float32\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/typedef_fadas_8h_1a4611b605e45ab401f02cab15c5e38715.html#_CPPv49float32_t) \*plane[FADAS\_NUM\_COMPMAT\_PLANES] - - uint32\_t numPlanes - Last Published: Sep 30, 2024 [Previous Topic Project Points](https://docs.qualcomm.com/bundle/publicresource/80-63309-1/topics/project_points.md) [Next Topic Convex Quadratic Programming](https://docs.qualcomm.com/bundle/publicresource/80-63309-1/topics/convex-quadratic-programming.md)