NMSIS-DSP  Version 1.2.0
NMSIS DSP Software Library
Elementwise clipping

Element-by-element clipping of a value. More...

Functions

void riscv_clip_f16 (const float16_t *pSrc, float16_t *pDst, float16_t low, float16_t high, uint32_t numSamples)
 Elementwise floating-point clipping. More...
 
void riscv_clip_f32 (const float32_t *pSrc, float32_t *pDst, float32_t low, float32_t high, uint32_t numSamples)
 Elementwise floating-point clipping. More...
 
void riscv_clip_q15 (const q15_t *pSrc, q15_t *pDst, q15_t low, q15_t high, uint32_t numSamples)
 Elementwise fixed-point clipping. More...
 
void riscv_clip_q31 (const q31_t *pSrc, q31_t *pDst, q31_t low, q31_t high, uint32_t numSamples)
 Elementwise fixed-point clipping. More...
 
void riscv_clip_q7 (const q7_t *pSrc, q7_t *pDst, q7_t low, q7_t high, uint32_t numSamples)
 Elementwise fixed-point clipping. More...
 

Detailed Description

Element-by-element clipping of a value.

The value is constrained between 2 bounds.

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

Function Documentation

◆ riscv_clip_f16()

void riscv_clip_f16 ( const float16_t *  pSrc,
float16_t *  pDst,
float16_t  low,
float16_t  high,
uint32_t  numSamples 
)

Elementwise floating-point clipping.

Parameters
[in]pSrcpoints to input values
[out]pDstpoints to output clipped values
[in]lowlower bound
[in]highhigher bound
[in]numSamplesnumber of samples to clip
Returns
none

◆ riscv_clip_f32()

void riscv_clip_f32 ( const float32_t *  pSrc,
float32_t *  pDst,
float32_t  low,
float32_t  high,
uint32_t  numSamples 
)

Elementwise floating-point clipping.

Parameters
[in]pSrcpoints to input values
[out]pDstpoints to output clipped values
[in]lowlower bound
[in]highhigher bound
[in]numSamplesnumber of samples to clip
Returns
none

◆ riscv_clip_q15()

void riscv_clip_q15 ( const q15_t *  pSrc,
q15_t *  pDst,
q15_t  low,
q15_t  high,
uint32_t  numSamples 
)

Elementwise fixed-point clipping.

Parameters
[in]pSrcpoints to input values
[out]pDstpoints to output clipped values
[in]lowlower bound
[in]highhigher bound
[in]numSamplesnumber of samples to clip
Returns
none

◆ riscv_clip_q31()

void riscv_clip_q31 ( const q31_t *  pSrc,
q31_t *  pDst,
q31_t  low,
q31_t  high,
uint32_t  numSamples 
)

Elementwise fixed-point clipping.

Parameters
[in]pSrcpoints to input values
[out]pDstpoints to output clipped values
[in]lowlower bound
[in]highhigher bound
[in]numSamplesnumber of samples to clip
Returns
none

◆ riscv_clip_q7()

void riscv_clip_q7 ( const q7_t *  pSrc,
q7_t *  pDst,
q7_t  low,
q7_t  high,
uint32_t  numSamples 
)

Elementwise fixed-point clipping.

Parameters
[in]pSrcpoints to input values
[out]pDstpoints to output clipped values
[in]lowlower bound
[in]highhigher bound
[in]numSamplesnumber of samples to clip
Returns
none