LIBML  Version 3.2.4
LIBML DSP Software Library
Functions
Vector Addition
Collaboration diagram for Vector Addition:

Functions

void tpt_add_f32 (f32_t *__restrict aOutData, const f32_t *__restrict aInDataA, const f32_t *__restrict aInDataB, uint32_t aCount)
 Floating-point vector addition. More...
 
void tpt_add_f64 (f64_t *__restrict aOutData, const f64_t *__restrict aInDataA, const f64_t *__restrict aInDataB, uint32_t aCount)
 Floating-point vector addition. More...
 
void tpt_add_q15 (q15_t *__restrict aOutData, const q15_t *__restrict aInDataA, const q15_t *__restrict aInDataB, uint32_t aCount)
 Q15 vector addition. More...
 
void tpt_add_q31 (q31_t *__restrict aOutData, const q31_t *__restrict aInDataA, const q31_t *__restrict aInDataB, uint32_t aCount)
 Q31 vector addition. More...
 
void tpt_add_q7 (q7_t *__restrict aOutData, const q7_t *__restrict aInDataA, const q7_t *__restrict aInDataB, uint32_t aCount)
 Q7 vector addition. More...
 

Detailed Description

Element-by-element addition of two vectors.

    aOutData[n] = aInDataA[n] + aInDataB[n],   0 <= n < aCount.
  

There are separate functions for floating-point, Q7, Q15, and Q31 data types.

Function Documentation

◆ tpt_add_f32()

void tpt_add_f32 ( f32_t *__restrict  aOutData,
const f32_t *__restrict  aInDataA,
const f32_t *__restrict  aInDataB,
uint32_t  aCount 
)

Floating-point vector addition.

Parameters
[out]aOutDatapoints to output vector
[in]aInDataApoints to first input vector
[in]aInDataBpoints to second input vector
[in]aCountnumber of samples in each vector
Returns
none

◆ tpt_add_f64()

void tpt_add_f64 ( f64_t *__restrict  aOutData,
const f64_t *__restrict  aInDataA,
const f64_t *__restrict  aInDataB,
uint32_t  aCount 
)

Floating-point vector addition.

Parameters
[out]aOutDatapoints to output vector
[in]aInDataApoints to first input vector
[in]aInDataBpoints to second input vector
[in]aCountnumber of samples in each vector
Returns
none

◆ tpt_add_q15()

void tpt_add_q15 ( q15_t *__restrict  aOutData,
const q15_t *__restrict  aInDataA,
const q15_t *__restrict  aInDataB,
uint32_t  aCount 
)

Q15 vector addition.

Parameters
[out]aOutDatapoints to output vector
[in]aInDataApoints to first input vector
[in]aInDataBpoints to second input vector
[in]aCountnumber of samples in each vector
Returns
none
Scaling and Overflow Behavior
The function uses saturating arithmetic. Results outside of the allowable Q15 range [0x8000 0x7FFF] are saturated.

◆ tpt_add_q31()

void tpt_add_q31 ( q31_t *__restrict  aOutData,
const q31_t *__restrict  aInDataA,
const q31_t *__restrict  aInDataB,
uint32_t  aCount 
)

Q31 vector addition.

Parameters
[out]aOutDatapoints to output vector
[in]aInDataApoints to first input vector
[in]aInDataBpoints to second input vector
[in]aCountnumber of samples in each vector
Returns
none
Scaling and Overflow Behavior
The function uses saturating arithmetic. Results outside of the allowable Q31 range [0x80000000 0x7FFFFFFF] are saturated.

◆ tpt_add_q7()

void tpt_add_q7 ( q7_t *__restrict  aOutData,
const q7_t *__restrict  aInDataA,
const q7_t *__restrict  aInDataB,
uint32_t  aCount 
)

Q7 vector addition.

Parameters
[out]aOutDatapoints to output vector
[in]aInDataApoints to first input vector
[in]aInDataBpoints to second input vector
[in]aCountnumber of samples in each vector
Returns
none
Scaling and Overflow Behavior
The function uses saturating arithmetic. Results outside of the allowable Q7 range [0x80 0x7F] are saturated.