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

Functions

void tpt_abs_f32 (f32_t *__restrict aOutData, const f32_t *__restrict aInData, uint32_t aCount)
 Floating-point vector absolute value. More...
 
void tpt_abs_f64 (f64_t *__restrict aOutData, const f64_t *__restrict aInData, uint32_t aCount)
 Floating-point vector absolute value. More...
 
void tpt_abs_q15 (q15_t *__restrict aOutData, const q15_t *__restrict aInData, uint32_t aCount)
 Q15 vector absolute value. More...
 
void tpt_abs_q31 (q31_t *__restrict aOutData, const q31_t *__restrict aInData, uint32_t aCount)
 Q31 vector absolute value. More...
 
void tpt_abs_q7 (q7_t *__restrict aOutData, const q7_t *__restrict aInData, uint32_t aCount)
 Q7 vector absolute value. More...
 

Detailed Description

Computes the absolute value of a vector on an element-by-element basis.

      aOutData[n] = abs(aInData[n]),   0 <= n < aCount.
  

The functions support in-place computation allowing the source and destination pointers to reference the same memory buffer. There are separate functions for floating-point, Q7, Q15, and Q31 data types.

Function Documentation

◆ tpt_abs_f32()

void tpt_abs_f32 ( f32_t *__restrict  aOutData,
const f32_t *__restrict  aInData,
uint32_t  aCount 
)

Floating-point vector absolute value.

Parameters
[out]aOutDatapoints to the output vector
[in]aInDatapoints to the input vector
[in]aCountnumber of samples in each vector
Returns
none

◆ tpt_abs_f64()

void tpt_abs_f64 ( f64_t *__restrict  aOutData,
const f64_t *__restrict  aInData,
uint32_t  aCount 
)

Floating-point vector absolute value.

Parameters
[out]aOutDatapoints to the output vector
[in]aInDatapoints to the input vector
[in]aCountnumber of samples in each vector
Returns
none

◆ tpt_abs_q15()

void tpt_abs_q15 ( q15_t *__restrict  aOutData,
const q15_t *__restrict  aInData,
uint32_t  aCount 
)

Q15 vector absolute value.

Parameters
[out]aOutDatapoints to the output vector
[in]aInDatapoints to the input vector
[in]aCountnumber of samples in each vector
Returns
none
Scaling and Overflow Behavior
The function uses saturating arithmetic. The Q15 value -1 (0x8000) will be saturated to the maximum allowable positive value 0x7FFF.

◆ tpt_abs_q31()

void tpt_abs_q31 ( q31_t *__restrict  aOutData,
const q31_t *__restrict  aInData,
uint32_t  aCount 
)

Q31 vector absolute value.

Parameters
[out]aOutDatapoints to the output vector
[in]aInDatapoints to the input vector
[in]aCountnumber of samples in each vector
Returns
none
Scaling and Overflow Behavior
The function uses saturating arithmetic. The Q31 value -1 (0x80000000) will be saturated to the maximum allowable positive value 0x7FFFFFFF.

◆ tpt_abs_q7()

void tpt_abs_q7 ( q7_t *__restrict  aOutData,
const q7_t *__restrict  aInData,
uint32_t  aCount 
)

Q7 vector absolute value.

Parameters
[out]aOutDatapoints to the output vector
[in]aInDatapoints to the input vector
[in]aCountnumber of samples in each vector
Returns
none
Scaling and Overflow Behavior
The function uses saturating arithmetic. The Q7 value -1 (0x80) will be saturated to the maximum allowable positive value 0x7F.