LIBDSP Version 4.1.9
LIBDSP Software Library
Loading...
Searching...
No Matches
Vector Negate
Collaboration diagram for Vector Negate:

Functions

void tpt_negate_f32 (f32_t *__restrict aOutData, const f32_t *__restrict aInData, uint32_t aCount)
 Negates the elements of a floating-point vector.
void tpt_negate_f64 (f64_t *__restrict aOutData, const f64_t *__restrict aInData, uint32_t aCount)
 Negates the elements of a floating-point vector.
void tpt_negate_q15 (q15_t *__restrict aOutData, const q15_t *__restrict aInData, uint32_t aCount)
 Negates the elements of a Q15 vector.
void tpt_negate_q31 (q31_t *__restrict aOutData, const q31_t *__restrict aInData, uint32_t aCount)
 Negates the elements of a Q31 vector.
void tpt_negate_q7 (q7_t *__restrict aOutData, const q7_t *__restrict aInData, uint32_t aCount)
 Negates the elements of a Q7 vector.

Detailed Description

Negates the elements of a vector.

   aOutData[n] = -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_negate_f32()

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

Negates the elements of a floating-point vector.

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

◆ tpt_negate_f64()

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

Negates the elements of a floating-point vector.

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

◆ tpt_negate_q15()

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

Negates the elements of a Q15 vector.

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

◆ tpt_negate_q31()

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

Negates the elements of a Q31 vector.

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

◆ tpt_negate_q7()

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

Negates the elements of a Q7 vector.

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