math_helper.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* ----------------------------------------------------------------------
  2. * Copyright (C) 2010 ARM Limited. All rights reserved.
  3. *
  4. * $Date: 29. November 2010
  5. * $Revision: V1.0.3
  6. *
  7. * Project: CMSIS DSP Library
  8. *
  9. * Title: math_helper.h
  10. *
  11. *
  12. * Description: Prototypes of all helper functions required.
  13. *
  14. * Target Processor: Cortex-M4/Cortex-M3
  15. *
  16. * Version 1.0.3 2010/11/29
  17. * Re-organized the CMSIS folders and updated documentation.
  18. *
  19. * Version 1.0.2 2010/11/11
  20. * Documentation updated.
  21. *
  22. * Version 1.0.1 2010/10/05
  23. * Production release and review comments incorporated.
  24. *
  25. * Version 1.0.0 2010/09/20
  26. * Production release and review comments incorporated.
  27. *
  28. * Version 0.0.7 2010/06/10
  29. * Misra-C changes done
  30. * -------------------------------------------------------------------- */
  31. #include "arm_math.h"
  32. #ifndef MATH_HELPER_H
  33. #define MATH_HELPER_H
  34. float arm_snr_f32(float *pRef, float *pTest, uint32_t buffSize);
  35. void arm_float_to_q12_20(float *pIn, q31_t * pOut, uint32_t numSamples);
  36. void arm_provide_guard_bits_q15(q15_t *input_buf, uint32_t blockSize, uint32_t guard_bits);
  37. void arm_provide_guard_bits_q31(q31_t *input_buf, uint32_t blockSize, uint32_t guard_bits);
  38. void arm_float_to_q14(float *pIn, q15_t *pOut, uint32_t numSamples);
  39. void arm_float_to_q29(float *pIn, q31_t *pOut, uint32_t numSamples);
  40. void arm_float_to_q28(float *pIn, q31_t *pOut, uint32_t numSamples);
  41. void arm_float_to_q30(float *pIn, q31_t *pOut, uint32_t numSamples);
  42. void arm_clip_f32(float *pIn, uint32_t numSamples);
  43. uint32_t arm_calc_guard_bits(uint32_t num_adds);
  44. void arm_apply_guard_bits (float32_t * pIn, uint32_t numSamples, uint32_t guard_bits);
  45. uint32_t arm_compare_fixed_q15(q15_t *pIn, q15_t * pOut, uint32_t numSamples);
  46. uint32_t arm_compare_fixed_q31(q31_t *pIn, q31_t *pOut, uint32_t numSamples);
  47. uint32_t arm_calc_2pow(uint32_t guard_bits);
  48. #endif