CMSIS-DSP  Version 1.7.0
CMSIS DSP Software Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
arm_matrix_example/math_helper.h File Reference

Functions

float arm_snr_f32 (float *pRef, float *pTest, uint32_t buffSize)
 Caluclation of SNR. More...
 
void arm_float_to_q12_20 (float *pIn, q31_t *pOut, uint32_t numSamples)
 Converts float to fixed in q12.20 format. More...
 
void arm_provide_guard_bits_q15 (q15_t *input_buf, uint32_t blockSize, uint32_t guard_bits)
 Provide guard bits for Input buffer. More...
 
void arm_provide_guard_bits_q31 (q31_t *input_buf, uint32_t blockSize, uint32_t guard_bits)
 Provide guard bits for Input buffer. More...
 
void arm_float_to_q14 (float *pIn, q15_t *pOut, uint32_t numSamples)
 Converts float to fixed q14. More...
 
void arm_float_to_q29 (float *pIn, q31_t *pOut, uint32_t numSamples)
 Converts float to fixed q30 format. More...
 
void arm_float_to_q28 (float *pIn, q31_t *pOut, uint32_t numSamples)
 Converts float to fixed q28 format. More...
 
void arm_float_to_q30 (float *pIn, q31_t *pOut, uint32_t numSamples)
 Converts float to fixed q30 format. More...
 
void arm_clip_f32 (float *pIn, uint32_t numSamples)
 Clip the float values to +/- 1. More...
 
uint32_t arm_calc_guard_bits (uint32_t num_adds)
 Caluclates number of guard bits. More...
 
void arm_apply_guard_bits (float32_t *pIn, uint32_t numSamples, uint32_t guard_bits)
 Apply guard bits to buffer. More...
 
uint32_t arm_compare_fixed_q15 (q15_t *pIn, q15_t *pOut, uint32_t numSamples)
 Compare MATLAB Reference Output and ARM Test output. More...
 
uint32_t arm_compare_fixed_q31 (q31_t *pIn, q31_t *pOut, uint32_t numSamples)
 Compare MATLAB Reference Output and ARM Test output. More...
 
uint32_t arm_calc_2pow (uint32_t guard_bits)
 Calculates pow(2, numShifts) More...
 

Function Documentation

void arm_apply_guard_bits ( float32_t pIn,
uint32_t  numSamples,
uint32_t  guard_bits 
)
Parameters
[in,out]pInpointer to input buffer
[in]numSamplesnumber of samples in the input buffer
[in]guard_bitsguard bits
Returns
none
uint32_t arm_calc_2pow ( uint32_t  numShifts)
Parameters
[in]numShiftsnumber of shifts
Returns
pow(2, numShifts)
uint32_t arm_calc_guard_bits ( uint32_t  num_adds)
Parameters
[in]num_addsnumber of additions
Returns
guard bits The function Caluclates the number of guard bits depending on the numtaps
void arm_clip_f32 ( float *  pIn,
uint32_t  numSamples 
)
Parameters
[in,out]pIninput buffer
[in]numSamplesnumber of samples in the buffer
Returns
none The function converts floating point values to fixed point values
uint32_t arm_compare_fixed_q15 ( q15_t pIn,
q15_t pOut,
uint32_t  numSamples 
)
Parameters
[in]pInPointer to Ref buffer
[in]pOutPointer to Test buffer
[in]numSamplesnumber of samples in the buffer
Returns
maximum difference
uint32_t arm_compare_fixed_q31 ( q31_t pIn,
q31_t pOut,
uint32_t  numSamples 
)
Parameters
[in]pInPointer to Ref buffer
[in]pOutPointer to Test buffer
[in]numSamplesnumber of samples in the buffer
Returns
maximum difference
void arm_float_to_q12_20 ( float *  pIn,
q31_t pOut,
uint32_t  numSamples 
)
Parameters
[in]pInpointer to input buffer
[out]pOutpointer to outputbuffer
[in]numSamplesnumber of samples in the input buffer
Returns
none The function converts floating point values to fixed point(q12.20) values
void arm_float_to_q14 ( float *  pIn,
q15_t pOut,
uint32_t  numSamples 
)
Parameters
[in]pInpointer to input buffer
[out]pOutpointer to output buffer
[in]numSamplesnumber of samples in the buffer
Returns
none The function converts floating point values to fixed point values
void arm_float_to_q28 ( float *  pIn,
q31_t pOut,
uint32_t  numSamples 
)
Parameters
[in]pInpointer to input buffer
[out]pOutpointer to output buffer
[in]numSamplesnumber of samples in the buffer
Returns
none The function converts floating point values to fixed point values
void arm_float_to_q29 ( float *  pIn,
q31_t pOut,
uint32_t  numSamples 
)
Parameters
[in]pInpointer to input buffer
[out]pOutpointer to output buffer
[in]numSamplesnumber of samples in the buffer
Returns
none The function converts floating point values to fixed point values
void arm_float_to_q30 ( float *  pIn,
q31_t pOut,
uint32_t  numSamples 
)
Parameters
[in]pInpointer to input buffer
[out]pOutpointer to output buffer
[in]numSamplesnumber of samples in the buffer
Returns
none The function converts floating point values to fixed point values
void arm_provide_guard_bits_q15 ( q15_t input_buf,
uint32_t  blockSize,
uint32_t  guard_bits 
)
Parameters
[in,out]input_bufPointer to input buffer
[in]blockSizeblock Size
[in]guard_bitsguard bits
Returns
none The function Provides the guard bits for the buffer to avoid overflow
void arm_provide_guard_bits_q31 ( q31_t input_buf,
uint32_t  blockSize,
uint32_t  guard_bits 
)
Parameters
[in,out]input_bufPointer to input buffer
[in]blockSizeblock Size
[in]guard_bitsguard bits
Returns
none The function Provides the guard bits for the buffer to avoid overflow
float arm_snr_f32 ( float *  pRef,
float *  pTest,
uint32_t  buffSize 
)
Parameters
[in]pRefPointer to the reference buffer
[in]pTestPointer to the test buffer
[in]buffSizetotal number of samples
Returns
SNR The function Caluclates signal to noise ratio for the reference output and test output