Functions
APULPF3_VECTOR_VECTOR_FUNCTIONS

Functions

int_fast16_t APULPF3_dotProduct (APULPF3_ComplexVector *vecA, APULPF3_ComplexVector *vecB, bool conjugate, float complex *result)
 APU function for calculating the dot product of two vectors, with the option to perform the complex conjugate on the second vector first. More...
 
int_fast16_t APULPF3_vectorMult (APULPF3_ComplexVector *vecA, APULPF3_ComplexVector *vecB, bool conjugate, APULPF3_ComplexVector *result)
 APU function for calculating the element-wise product of two vectors, with the option to perform the complex conjugate on the second vector first. More...
 
int_fast16_t APULPF3_vectorScalarMult (APULPF3_ComplexVector *vecA, float complex *scalar, APULPF3_ComplexVector *result)
 APU function for calculating the product of a vector and a scalar. More...
 
int_fast16_t APULPF3_vectorSum (APULPF3_ComplexVector *vecA, APULPF3_ComplexVector *vecB, bool subtraction, APULPF3_ComplexVector *result)
 APU function for calculating the summation of a vector and a scalar. More...
 
int_fast16_t APULPF3_vectorR2C (APULPF3_ComplexVector *vecA, APULPF3_ComplexVector *vecB, APULPF3_R2COp operator, APULPF3_ComplexVector *result)
 APU function for converting vectors back and forth between real and complex number formats. More...
 

Detailed Description

Function Documentation

§ APULPF3_dotProduct()

int_fast16_t APULPF3_dotProduct ( APULPF3_ComplexVector vecA,
APULPF3_ComplexVector vecB,
bool  conjugate,
float complex *  result 
)

APU function for calculating the dot product of two vectors, with the option to perform the complex conjugate on the second vector first.

Defined as:

c = A dot B = sum(A[i] * B[i]), i = 0 to N-1

or if conjugate is true:

c = A dot conj(B) = sum(A[i] * conj(B[i])), i = 0 to N-1

in which, A, B are complex vectors and c is a complex scalar.

Precondition
APULPF3_init() has to be called first.
Parameters
[in]vecAa pointer to input vector A
[in]vecBa pointer to input vector B
[in]conjugatewhether or not to conjugate vecB
[out]resulta pointer where the output will be placed
Returns
A status code indicating whether the APU operation was a success.
Return values
APULPF3_STATUS_SUCCESSThe call was successful.
APULPF3_STATUS_ERRORThe input vectors were of different sizes.

§ APULPF3_vectorMult()

int_fast16_t APULPF3_vectorMult ( APULPF3_ComplexVector vecA,
APULPF3_ComplexVector vecB,
bool  conjugate,
APULPF3_ComplexVector result 
)

APU function for calculating the element-wise product of two vectors, with the option to perform the complex conjugate on the second vector first.

If both arguments and the result pointer are already within APU memory, the function will be executed in scratchpad mode. This means that it will assume pointers are placed so each of the input and result vectors lie after aeach other in memory.

Defined as:

C = A .* B = [A[0] * B[0], A[1] * B[1], .., A[N-1] * B[N-1]]

or if conjugate is true:

C = A .* conj(B) = [A[0] * conj(B[0]), A[1] * conj(B[1]), .., A[N-1] * conj(B[N-1])]

in which, A, B and C are complex vectors.

Precondition
APULPF3_init() has to be called first.
Parameters
[in]vecAa pointer to input vector A
[in]vecBa pointer to input vector B
[in]conjugatewhether or not to conjugate vecB
[out]resulta pointer to a vector where the result 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_STATUS_ERRORThe input vectors were of different sizes.

§ APULPF3_vectorScalarMult()

int_fast16_t APULPF3_vectorScalarMult ( APULPF3_ComplexVector vecA,
float complex *  scalar,
APULPF3_ComplexVector result 
)

APU function for calculating the product of a vector and a scalar.

Defined as:

C = A * b = [A[0] * b, A[1] * b, .., A[N-1] * b]

in which, A and C are complex vectors and b is a complex scalar.

Precondition
APULPF3_init() has to be called first.
Parameters
[in]vecAa pointer to input vector A
[in]scalara pointer to a complex scalar
[out]resulta pointer to a vector where the result 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_vectorSum()

int_fast16_t APULPF3_vectorSum ( APULPF3_ComplexVector vecA,
APULPF3_ComplexVector vecB,
bool  subtraction,
APULPF3_ComplexVector result 
)

APU function for calculating the summation of a vector and a scalar.

Defined as:

C = A + b = [A[0] + b, A[1] + b, .., A[N-1] + b]

or if subtraction is true:

:
C = A - b = [A[0] - b, A[1] - b, .., A[N-1] - b]
in which, A and C are complex vectors and b is a complex scalar.
@pre #APULPF3_init() has to be called first.
@param[in] vecA a pointer to input vector A
@param[in] scalar a pointer to a complex scalar
@param[in] subtraction subtraction if true, otherwise addition
@param [out] result a pointer to a vector where the result will be placed
@note See @ref ti_drivers_APU_DataManagement for directions on efficient APU memory management.
@return A status code indicating whether the APU operation was a success.
@retval #APULPF3_STATUS_SUCCESS The call was successful.
/
int_fast16_t APULPF3_vectorScalarSum(APULPF3_ComplexVector *vecA,
float complex *scalar,
bool subtraction,

or if subtraction is true:

C = A - B = [A[0] - B[0], A[1] - B[1], .., A[N-1] - B[N-1]]

in which, A, B and C are complex vectors.

Precondition
APULPF3_init() has to be called first.
Parameters
[in]vecAa pointer to input vector A
[in]vecBa pointer to input vector B
[in]subtractionsubtraction if true, otherwise addition
[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 input vectors were of different sizes.

§ APULPF3_vectorR2C()

int_fast16_t APULPF3_vectorR2C ( APULPF3_ComplexVector vecA,
APULPF3_ComplexVector vecB,
APULPF3_R2COp  operator,
APULPF3_ComplexVector result 
)

APU function for converting vectors back and forth between real and complex number formats.

Defined as:

Y = R2C(A, B) = [R2C(A[i], B[i])] for i = 1:N

in which, A, B, and Y are N-length complex vectors.

Precondition
APULPF3_init() has to be called first.
Parameters
[in]vecAa pointer to input vector A
[in]vecBa pointer to input vector B. Note that if only vecA is used, vecB is ignored and can be NULL
[in]operatora conversion operator
[out]resulta pointer where the output will be placed
Returns
A status code indicating whether the APU operation was a success.
Return values
APULPF3_STATUS_SUCCESSThe call was successful.
APULPF3_STATUS_ERRORThe input vectors were of different sizes.
© Copyright 1995-2025, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale