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

Functions

void tpt_clip_f32 (f32_t *aOutData, const f32_t *aInData, const f32_t aLow, const f32_t aHigh, uint32_t aCount)
 Elementwise clipping of f32 function. More...
 
void tpt_clip_f64 (f64_t *aOutData, const f64_t *aInData, const f64_t aLow, const f64_t aHigh, uint32_t aCount)
 Elementwise clipping of f32 function. More...
 
void tpt_clip_q31 (q31_t *aOutData, const q31_t *aInData, q31_t aLow, q31_t aHigh, uint32_t aCount)
 Elementwise clipping of q31 function. More...
 
void tpt_clip_q15 (q15_t *aOutData, const q15_t *aInData, q15_t aLow, q15_t aHigh, uint32_t aCount)
 Elementwise clipping of q15 function. More...
 
void tpt_clip_q7 (q7_t *aOutData, const q7_t *aInDataA, q7_t aLow, q7_t aHigh, uint32_t aCount)
 Elementwise clipping of q7 function. More...
 

Detailed Description

Elementwise clipping functions constrain values from elements of a source vector to be within two bounds and write the results one-by-one into a destination vector.

Terapines DSP library supports distinct elementwise clipping functions for single-precision floating-point, Q31, Q15 and Q7 data types. These functions are introduced in the subsections below.

Function Documentation

◆ tpt_clip_f32()

void tpt_clip_f32 ( f32_t aOutData,
const f32_t aInData,
const f32_t  aLow,
const f32_t  aHigh,
uint32_t  aCount 
)

Elementwise clipping of f32 function.

Parameters
[out]aOutDatapointer of the output vector
[in]aInDatapointer of the input vector
[in]aLowlower bound.
[in]aHighhigher bound.
[in]aCountnumber of elements in a vector

◆ tpt_clip_f64()

void tpt_clip_f64 ( f64_t aOutData,
const f64_t aInData,
const f64_t  aLow,
const f64_t  aHigh,
uint32_t  aCount 
)

Elementwise clipping of f32 function.

Parameters
[out]aOutDatapointer of the output vector
[in]aInDatapointer of the input vector
[in]aLowlower bound.
[in]aHighhigher bound.
[in]aCountnumber of elements in a vector

◆ tpt_clip_q15()

void tpt_clip_q15 ( q15_t aOutData,
const q15_t aInData,
q15_t  aLow,
q15_t  aHigh,
uint32_t  aCount 
)

Elementwise clipping of q15 function.

Parameters
[out]aOutDatapointer of the output vector
[in]aInDatapointer of the input vector
[in]aLowlower bound.
[in]aHighhigher bound.
[in]aCountnumber of elements in a vector

◆ tpt_clip_q31()

void tpt_clip_q31 ( q31_t aOutData,
const q31_t aInData,
q31_t  aLow,
q31_t  aHigh,
uint32_t  aCount 
)

Elementwise clipping of q31 function.

Parameters
[out]aOutDatapointer of the output vector
[in]aInDatapointer of the input vector
[in]aLowlower bound.
[in]aHighhigher bound.
[in]aCountnumber of elements in a vector

◆ tpt_clip_q7()

void tpt_clip_q7 ( q7_t aOutData,
const q7_t aInDataA,
q7_t  aLow,
q7_t  aHigh,
uint32_t  aCount 
)

Elementwise clipping of q7 function.

Parameters
[out]aOutDatapointer of the output vector
[in]aInDataApointer of the input vector
[in]aLowlower bound.
[in]aHighhigher bound.
[in]aCountnumber of elements in a vector