CC27xxDriverLibrary
Collaboration diagram for [apu.h] APU Vector Operations:

Functions

void APUVectorDot (uint16_t N, void *pInputA, void *pInputB, void *pResult)
 APU accelerator for vector dot product c = A dot B. More...
 
void APUVectorDotConj (uint16_t N, void *pInputA, void *pInputB, void *pResult)
 APU accelerator for vector dot product c = A dot conj(B) More...
 
void APUVectorMult (uint16_t N, void *pInputA, void *pInputB, void *pResult)
 APU accelerator for element-wise product of two vectors. More...
 
void APUVectorScalarMult (uint16_t N, void *pInputA, void *pInputB, void *pResult)
 APU accelerator for product of a vector and a scalar. More...
 
void APUVectorMultConj (uint16_t N, void *pInputA, void *pInputB, void *pResult)
 APU accelerator for element-wise product of vector A with the conjugate of vector B. More...
 
void APUVectorSum (uint16_t N, void *pInputA, void *pInputB, uint16_t op, void *pResult)
 APU accelerator for addition/subtraction of two vectors. More...
 
void APUVectorScalarSum (uint16_t N, void *pInputA, void *pInputB, uint16_t op, void *pResult)
 APU accelerator for addition/subtraction of a vector and a scalar. More...
 
void APUVectorCart2Pol (uint16_t N, void *pInput, void *pResult)
 APU accelerator for element-wise Cartesian-to-Polar transformation of a vector. More...
 
void APUVectorPol2Cart (uint16_t N, void *pInput, void *pResult, void *pTemp)
 APU accelerator for element-wise Polar-to-Cartesian transformation of a vector. More...
 
void APUVectorSort (uint16_t N, void *pInput)
 APU accelerator for in-place sorting of a vector. More...
 

Detailed Description

Function Documentation

§ APUVectorDot()

void APUVectorDot ( uint16_t  N,
void *  pInputA,
void *  pInputB,
void *  pResult 
)

APU accelerator for vector dot product c = A dot B.

Calculate the scalar product (dot product/inner product) of two vectors.

Defined as:

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

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

Parameters
Nis the size of the input vectors. Both vectors must be the same size
pInputAa pointer to the base of the first input vector, in APU memory
pInputBa pointer to the base of the second input vector, in APU memory
pResulta pointer to where the result will be placed, in APU memory
Returns
None

References APU_API_DOTPROD, and APU_GET_DATA_MEM_OFFSET.

§ APUVectorDotConj()

void APUVectorDotConj ( uint16_t  N,
void *  pInputA,
void *  pInputB,
void *  pResult 
)

APU accelerator for vector dot product c = A dot conj(B)

Calculate the scalar product (dot product/inner product) of vector A and conjugate of vector B.

Defined as:

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

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

Parameters
Nis the size of the input vectors. Both vectors must be the same size
pInputAa pointer to the base of the first input vector, in APU memory
pInputBa pointer to the base of the second input vector, in APU memory
pResulta pointer to where the result will be placed, in APU memory
Returns
None

References APU_API_DOTPROD, and APU_GET_DATA_MEM_OFFSET.

§ APUVectorMult()

void APUVectorMult ( uint16_t  N,
void *  pInputA,
void *  pInputB,
void *  pResult 
)

APU accelerator for element-wise product of two vectors.

Calculate the element-wise product (also called Hadamard product) of two vectors.

Defined as:

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.

Parameters
Nis the size of the input vectors. Both vectors must be the same size
pInputAa pointer to the base of the first input vector, in APU memory
pInputBa pointer to the base of the second input vector, in APU memory
pResulta pointer to where the result will be placed, in APU memory
Returns
None

References APU_API_VECTMULT, and APU_GET_DATA_MEM_OFFSET.

§ APUVectorScalarMult()

void APUVectorScalarMult ( uint16_t  N,
void *  pInputA,
void *  pInputB,
void *  pResult 
)

APU accelerator for product of a vector and a scalar.

Calculate 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, C are complex vectors and b is a complex scalar.

Parameters
Nis the size of the input and output vectors
pInputAa pointer to the base of the first input vector, in APU memory
pInputBa pointer to the base of the scalar, in APU memory
pResulta pointer to where the result will be placed, in APU memory
Returns
None

References APU_API_VECTMULT, and APU_GET_DATA_MEM_OFFSET.

Referenced by APUMatrixScalarMult().

§ APUVectorMultConj()

void APUVectorMultConj ( uint16_t  N,
void *  pInputA,
void *  pInputB,
void *  pResult 
)

APU accelerator for element-wise product of vector A with the conjugate of vector B.

Defined as:

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.

Parameters
Nis the size of the input vectors. Both vectors must be the same size
pInputAa pointer to the base of the first input vector, in APU memory
pInputBa pointer to the base of the second input vector, in APU memory
pResulta pointer to where the result will be placed, in APU memory
Returns
None

References APU_API_VECTMULT, and APU_GET_DATA_MEM_OFFSET.

§ APUVectorSum()

void APUVectorSum ( uint16_t  N,
void *  pInputA,
void *  pInputB,
uint16_t  op,
void *  pResult 
)

APU accelerator for addition/subtraction of two vectors.

Calculate vector addition of two vectors.

Defined as:

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.

Parameters
Nis the size of the input vectors. Both vectors must be the same size
pInputAa pointer to the base of the first input vector, in APU memory
pInputBa pointer to the base of the second input vector, in APU memory
opselect the operator, addition or substraction
pResulta pointer to where the result will be placed, in APU memory
Returns
None

References APU_API_VECTSUM, and APU_GET_DATA_MEM_OFFSET.

§ APUVectorScalarSum()

void APUVectorScalarSum ( uint16_t  N,
void *  pInputA,
void *  pInputB,
uint16_t  op,
void *  pResult 
)

APU accelerator for addition/subtraction of a vector and a scalar.

Calculate vector addition/subtraction 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 scalar.

Parameters
Nis the size of the input vectors. Both vectors must be the same size
pInputAa pointer to the base of the first input vector, in APU memory
pInputBa pointer to the base of the second input vector, in APU memory
opselect the operator, addition or substraction
pResulta pointer to where the result will be placed, in APU memory
Returns
None

References APU_API_VECTSUM, and APU_GET_DATA_MEM_OFFSET.

Referenced by APUMatrixScalarSum().

§ APUVectorCart2Pol()

void APUVectorCart2Pol ( uint16_t  N,
void *  pInput,
void *  pResult 
)

APU accelerator for element-wise Cartesian-to-Polar transformation of a vector.

Calculate element-wise Cartesian-to-Polar transformation.

Defined as:

C[i] = cartesian_to_polar(A[i]), i = 0 to N-1

in which A, C are two complex vectors.

Note
The elements of input vector A are assumed in Cartesian representation. The elements of output vector C are in Polar representation.
Parameters
Nlength of the vector
pInputa pointer to the base of the first input vector A, in APU memory
pResulta pointer to where the result will be placed, in APU memory
Returns
None

References APU_API_POLAR, and APU_GET_DATA_MEM_OFFSET.

§ APUVectorPol2Cart()

void APUVectorPol2Cart ( uint16_t  N,
void *  pInput,
void *  pResult,
void *  pTemp 
)

APU accelerator for element-wise Polar-to-Cartesian transformation of a vector.

Calculate element-wise Polar-to-Cartesian transformation.

Defined as:

C[i] = polar_to_cartesian(A[i]), i = 0 to N-1

in which A, C are two complex vectors.

Note
The elements of input vector A are assumed in Polar representation. The elements of output vector C are in Cartesian representation. This API requires a temporary vector pTemp of length N to store temporary results. Instead of using fixed and pre-defined allocation, this API allows users flexibly select the location of this temporary vector for a better utilization of available memory.
Parameters
Nlength of the vector
pInputa pointer to the base of the first input vector A, in APU memory
pResulta pointer to where the result will be placed, in APU memory
pTempa pointer to a temporary vector of length N in APU memory
Returns
None

References APU_API_CARTESIAN, and APU_GET_DATA_MEM_OFFSET.

§ APUVectorSort()

void APUVectorSort ( uint16_t  N,
void *  pInput 
)

APU accelerator for in-place sorting of a vector.

Sort (in-place) an input vector in descending order based on the real component of each element.

Defined as:

C = sort(A, "descend", "ComparisonMethod", "real")

in which A, C are two complex vectors.

Note
This is an in-place sorting, which means the input vector will be overwritten by its sorted version.
Parameters
Nlength of the vector A/C
pInputa pointer to the base of the input vector A, in APU memory
Returns
None

References APU_API_SORT, and APU_GET_DATA_MEM_OFFSET.