CMSIS DSP library

Dependents:   KL25Z_FFT_Demo Hat_Board_v5_1 KL25Z_FFT_Demo_tony KL25Z_FFT_Demo_tony ... more

Fork of mbed-dsp by mbed official

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers math_helper.h Source File

math_helper.h

00001 /* ----------------------------------------------------------------------   
00002 * Copyright (C) 2010-2013 ARM Limited. All rights reserved.   
00003 *   
00004 * $Date:        17. January 2013  
00005 * $Revision:    V1.4.0   
00006 *  
00007 * Project:      CMSIS DSP Library 
00008 *
00009 * Title:        math_helper.h
00010 * 
00011 * Description:  Prototypes of all helper functions required.  
00012 *
00013 * Target Processor: Cortex-M4/Cortex-M3
00014 *  
00015 * Redistribution and use in source and binary forms, with or without 
00016 * modification, are permitted provided that the following conditions
00017 * are met:
00018 *   - Redistributions of source code must retain the above copyright
00019 *     notice, this list of conditions and the following disclaimer.
00020 *   - Redistributions in binary form must reproduce the above copyright
00021 *     notice, this list of conditions and the following disclaimer in
00022 *     the documentation and/or other materials provided with the 
00023 *     distribution.
00024 *   - Neither the name of ARM LIMITED nor the names of its contributors
00025 *     may be used to endorse or promote products derived from this
00026 *     software without specific prior written permission.
00027 *
00028 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00029 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00030 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
00031 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
00032 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
00033 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
00034 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00035 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00036 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00037 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
00038 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00039 * POSSIBILITY OF SUCH DAMAGE.  
00040 * -------------------------------------------------------------------- */
00041 
00042 
00043 #include "arm_math.h"
00044 
00045 #ifndef MATH_HELPER_H
00046 #define MATH_HELPER_H
00047 
00048 #ifdef  __cplusplus
00049 extern "C"
00050 {
00051 #endif
00052 
00053 float arm_snr_f32(float *pRef, float *pTest,  uint32_t buffSize);  
00054 void arm_float_to_q12_20(float *pIn, q31_t * pOut, uint32_t numSamples);
00055 void arm_provide_guard_bits_q15(q15_t *input_buf, uint32_t blockSize, uint32_t guard_bits);
00056 void arm_provide_guard_bits_q31(q31_t *input_buf, uint32_t blockSize, uint32_t guard_bits);
00057 void arm_float_to_q14(float *pIn, q15_t *pOut, uint32_t numSamples);
00058 void arm_float_to_q29(float *pIn, q31_t *pOut, uint32_t numSamples);
00059 void arm_float_to_q28(float *pIn, q31_t *pOut, uint32_t numSamples);
00060 void arm_float_to_q30(float *pIn, q31_t *pOut, uint32_t numSamples);
00061 void arm_clip_f32(float *pIn, uint32_t numSamples);
00062 uint32_t arm_calc_guard_bits(uint32_t num_adds);
00063 void arm_apply_guard_bits (float32_t * pIn, uint32_t numSamples, uint32_t guard_bits);
00064 uint32_t arm_compare_fixed_q15(q15_t *pIn, q15_t * pOut, uint32_t numSamples);
00065 uint32_t arm_compare_fixed_q31(q31_t *pIn, q31_t *pOut, uint32_t numSamples);
00066 uint32_t arm_calc_2pow(uint32_t guard_bits);
00067 
00068 #ifdef  __cplusplus
00069 }
00070 #endif
00071 
00072 #endif
00073