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

Functions

void tpt_mult_f32 (f32_t *__restrict aOutData, const f32_t *__restrict aInDataA, const f32_t *__restrict aInDataB, uint32_t aCount)
 Floating-point vector multiplication. More...
 
void tpt_mult_f64 (f64_t *__restrict aOutData, const f64_t *__restrict aInDataA, const f64_t *__restrict aInDataB, uint32_t aCount)
 Floating-point vector multiplication. More...
 
void tpt_mult_q15 (q15_t *__restrict aOutData, const q15_t *__restrict aInDataA, const q15_t *__restrict aInDataB, uint32_t aCount)
 Q15 vector multiplication. More...
 
void tpt_mult_q31 (q31_t *__restrict aOutData, const q31_t *__restrict aInDataA, const q31_t *__restrict aInDataB, uint32_t aCount)
 Q31 vector multiplication. More...
 
void tpt_mult_q7 (q7_t *__restrict aOutData, const q7_t *__restrict aInDataA, const q7_t *__restrict aInDataB, uint32_t aCount)
 Q7 vector multiplication. More...
 
void tpt_mult_u8_u16 (uint16_t *__restrict aOuData, uint8_t *__restrict aInDataA, uint8_t *__restrict aInDataB, uint32_t aCount)
 U8 vector multiplication. More...
 

Detailed Description

Element-by-element multiplication 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_mult_f32()

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

Floating-point vector multiplication.

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_mult_f64()

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

Floating-point vector multiplication.

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_mult_q15()

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

Q15 vector multiplication.

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_mult_q31()

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

Q31 vector multiplication.

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_mult_q7()

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

Q7 vector multiplication.

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.

◆ tpt_mult_u8_u16()

void tpt_mult_u8_u16 ( uint16_t *__restrict  aOuData,
uint8_t *__restrict  aInDataA,
uint8_t *__restrict  aInDataB,
uint32_t  aCount 
)

U8 vector multiplication.

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
Ouput results will be in U16 range [0x00 0xFFFF]