Functions
APULPF3_VECTOR_ALGORITHMS

Functions

int_fast16_t APULPF3_cartesianToPolarVector (APULPF3_ComplexVector *vec, APULPF3_ComplexVector *result)
 APU function for converting a complex vector in cartesian format to polar format. More...
 
int_fast16_t APULPF3_polarToCartesianVector (APULPF3_ComplexVector *vec, float complex *temp, APULPF3_ComplexVector *result)
 APU function for converting a complex vector in polar format to cartesian format. More...
 
int_fast16_t APULPF3_sortVector (APULPF3_ComplexVector *vec, APULPF3_ComplexVector *result)
 APU function for sorting the real parts of a complex vector in descending order. This function ignores the complex parts of each element and makes no guarantees to their contents after the operation is complete. More...
 
int_fast16_t APULPF3_covMatrixSpatialSmoothing (APULPF3_ComplexVector *vec, uint16_t covMatrixSize, bool fbAveraging, APULPF3_ComplexTriangleMatrix *result)
 APU function for covariance matrix computation using spatial smoothing and optionally forward-backward averaging. More...
 
int_fast16_t APULPF3_computeFFT (APULPF3_ComplexVector *vec, bool inverse, APULPF3_ComplexVector *result)
 APU function for computing the Discrete Fourier transform (DFT) of a complex vector using the Fast Fourier Transform (FFT) algorithm. Optionally, the Inverse DFT can be computed. Combines two APU operations; first configuring the APU for a fourier transform, then actually computing it. More...
 
int_fast16_t APULPF3_vectorMaxMin (APULPF3_ComplexVector *vec, float scalarThreshold, bool min, APULPF3_ComplexVector *result)
 APU function for computing max/min of the real part of a vector and a real value scalar APU accelerator for computing max/min of the real part of a vector and a real value scalar. More...
 

Detailed Description

Function Documentation

§ APULPF3_cartesianToPolarVector()

int_fast16_t APULPF3_cartesianToPolarVector ( APULPF3_ComplexVector vec,
APULPF3_ComplexVector result 
)

APU function for converting a complex vector in cartesian format to polar format.

Precondition
APULPF3_init() has to be called first.
Parameters
[in]veca pointer to an input vector in cartesian format
[out]resulta pointer to the vector where the output will be placed. Its size must be the same as that of the inputs.
Note
See ti_drivers_APU_DataManagement for directions on efficient APU memory management.
Returns
A status code indicating whether the APU operation was a success.
Return values
APULPF3_STATUS_SUCCESSThe call was successful.

§ APULPF3_polarToCartesianVector()

int_fast16_t APULPF3_polarToCartesianVector ( APULPF3_ComplexVector vec,
float complex *  temp,
APULPF3_ComplexVector result 
)

APU function for converting a complex vector in polar format to cartesian format.

Precondition
APULPF3_init() has to be called first.
Parameters
[in]veca pointer to an input vector in cartesian format
[in]tempa pointer to a temporary vector of the same length as vec to store temporary results. If the vec and result are not in APU memory, this argument is ignored and the temp vector is placed after the result in APU memory.
[out]resulta pointer to a vector where the output will be placed. Its size must be the same as that of the inputs.
Note
See ti_drivers_APU_DataManagement for directions on efficient APU memory management.
Returns
A status code indicating whether the APU operation was a success.
Return values
APULPF3_STATUS_SUCCESSThe call was successful.
APULPF3_STATUS_ERRORThe temp vector was not in APU space.

§ APULPF3_sortVector()

int_fast16_t APULPF3_sortVector ( APULPF3_ComplexVector vec,
APULPF3_ComplexVector result 
)

APU function for sorting the real parts of a complex vector in descending order. This function ignores the complex parts of each element and makes no guarantees to their contents after the operation is complete.

Precondition
APULPF3_init() has to be called first.
Parameters
[in]veca pointer to an input vector to be sorted
[out]resulta pointer to a vector where the output will be placed. Its size must be the same as that of the inputs.
Note
See ti_drivers_APU_DataManagement for directions on efficient APU memory management.
Returns
A status code indicating whether the APU operation was a success.
Return values
APULPF3_STATUS_SUCCESSThe call was successful.

§ APULPF3_covMatrixSpatialSmoothing()

int_fast16_t APULPF3_covMatrixSpatialSmoothing ( APULPF3_ComplexVector vec,
uint16_t  covMatrixSize,
bool  fbAveraging,
APULPF3_ComplexTriangleMatrix result 
)

APU function for covariance matrix computation using spatial smoothing and optionally forward-backward averaging.

Given a received signal length N, a smaller matrix (LxL) with L < N is created by averaging (N-L+1) overlapped covariance matrices. When forward-backward averaging is applied, the output matrix becomes:

Rfb = 1/2(R + J * R' * J)

Where R is the spacially smoother matrix and J is the exchange matrix. R' signifies the conjugate transpose of R.

Precondition
APULPF3_init() has to be called first.
Parameters
[in]veca pointer to an input vector
[in]covMatrixSizesize of the output covariance matrix. The output triangular matrix will have rows and columns equal to this value.
[in]fbAveragingwhether or not to perform forward-backwards averaging
[out]resulta pointer to a upper triangle matrix where the output will be placed
Note
See ti_drivers_APU_DataManagement for directions on efficient APU memory management.
Returns
A status code indicating whether the APU operation was a success.
Return values
APULPF3_STATUS_SUCCESSThe call was successful.

§ APULPF3_computeFFT()

int_fast16_t APULPF3_computeFFT ( APULPF3_ComplexVector vec,
bool  inverse,
APULPF3_ComplexVector result 
)

APU function for computing the Discrete Fourier transform (DFT) of a complex vector using the Fast Fourier Transform (FFT) algorithm. Optionally, the Inverse DFT can be computed. Combines two APU operations; first configuring the APU for a fourier transform, then actually computing it.

Precondition
APULPF3_init() has to be called first.
Parameters
[in]veca pointer to an input vector. The vector needs to have a size equal to a power of two.
[in]inversewhether or not to perform IFFT instead of DFT
[out]resulta pointer to a vector where the output will be placed
Note
See ti_drivers_APU_DataManagement for directions on efficient APU memory management.
Returns
A status code indicating whether the APU operation was a success.
Return values
APULPF3_STATUS_SUCCESSThe call was successful.

§ APULPF3_vectorMaxMin()

int_fast16_t APULPF3_vectorMaxMin ( APULPF3_ComplexVector vec,
float  scalarThreshold,
bool  min,
APULPF3_ComplexVector result 
)

APU function for computing max/min of the real part of a vector and a real value scalar APU accelerator for computing max/min of the real part of a vector and a real value scalar.

Y = max(X, scalarThreshold) = [max(real(X[i]), scalarThreshold)] for i = 1:N

or if min is true:

Y = min(X, scalarThreshold) = [min(real(X[i]), scalarThreshold)] for i = 1:N

in which, X and Y is the N-length complex vector, and scalarThreshold is a real scalar.

Precondition
APULPF3_init() has to be called first.
Parameters
[in]veca pointer to an input vector
[in]scalarThresholda real value threshold to be compared against
[in]mincompute minimum if true, otherwise compute maximum
[out]resulta pointer to the vector where the output will be placed. Its size must be the same as that of the inputs.
Note
See ti_drivers_APU_DataManagement for directions on efficient APU memory management.
Returns
A status code indicating whether the APU operation was a success.
Return values
APULPF3_STATUS_SUCCESSThe call was successful.
© Copyright 1995-2025, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale