complex_math_functions_f16.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. /******************************************************************************
  2. * @file complex_math_functions_f16.h
  3. * @brief Public header file for CMSIS DSP Library
  4. * @version V1.9.0
  5. * @date 20. July 2020
  6. ******************************************************************************/
  7. /*
  8. * Copyright (c) 2010-2020 Arm Limited or its affiliates. All rights reserved.
  9. *
  10. * SPDX-License-Identifier: Apache-2.0
  11. *
  12. * Licensed under the Apache License, Version 2.0 (the License); you may
  13. * not use this file except in compliance with the License.
  14. * You may obtain a copy of the License at
  15. *
  16. * www.apache.org/licenses/LICENSE-2.0
  17. *
  18. * Unless required by applicable law or agreed to in writing, software
  19. * distributed under the License is distributed on an AS IS BASIS, WITHOUT
  20. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  21. * See the License for the specific language governing permissions and
  22. * limitations under the License.
  23. */
  24. #ifndef _COMPLEX_MATH_FUNCTIONS_F16_H_
  25. #define _COMPLEX_MATH_FUNCTIONS_F16_H_
  26. #include "arm_math_types_f16.h"
  27. #include "arm_math_memory.h"
  28. #include "dsp/none.h"
  29. #include "dsp/utils.h"
  30. #include "dsp/fast_math_functions_f16.h"
  31. #ifdef __cplusplus
  32. extern "C"
  33. {
  34. #endif
  35. #if defined(ARM_FLOAT16_SUPPORTED)
  36. /**
  37. * @brief Floating-point complex conjugate.
  38. * @param[in] pSrc points to the input vector
  39. * @param[out] pDst points to the output vector
  40. * @param[in] numSamples number of complex samples in each vector
  41. */
  42. void arm_cmplx_conj_f16(
  43. const float16_t * pSrc,
  44. float16_t * pDst,
  45. uint32_t numSamples);
  46. /**
  47. * @brief Floating-point complex magnitude squared
  48. * @param[in] pSrc points to the complex input vector
  49. * @param[out] pDst points to the real output vector
  50. * @param[in] numSamples number of complex samples in the input vector
  51. */
  52. void arm_cmplx_mag_squared_f16(
  53. const float16_t * pSrc,
  54. float16_t * pDst,
  55. uint32_t numSamples);
  56. /**
  57. * @brief Floating-point complex magnitude
  58. * @param[in] pSrc points to the complex input vector
  59. * @param[out] pDst points to the real output vector
  60. * @param[in] numSamples number of complex samples in the input vector
  61. */
  62. void arm_cmplx_mag_f16(
  63. const float16_t * pSrc,
  64. float16_t * pDst,
  65. uint32_t numSamples);
  66. /**
  67. * @brief Floating-point complex dot product
  68. * @param[in] pSrcA points to the first input vector
  69. * @param[in] pSrcB points to the second input vector
  70. * @param[in] numSamples number of complex samples in each vector
  71. * @param[out] realResult real part of the result returned here
  72. * @param[out] imagResult imaginary part of the result returned here
  73. */
  74. void arm_cmplx_dot_prod_f16(
  75. const float16_t * pSrcA,
  76. const float16_t * pSrcB,
  77. uint32_t numSamples,
  78. float16_t * realResult,
  79. float16_t * imagResult);
  80. /**
  81. * @brief Floating-point complex-by-real multiplication
  82. * @param[in] pSrcCmplx points to the complex input vector
  83. * @param[in] pSrcReal points to the real input vector
  84. * @param[out] pCmplxDst points to the complex output vector
  85. * @param[in] numSamples number of samples in each vector
  86. */
  87. void arm_cmplx_mult_real_f16(
  88. const float16_t * pSrcCmplx,
  89. const float16_t * pSrcReal,
  90. float16_t * pCmplxDst,
  91. uint32_t numSamples);
  92. /**
  93. * @brief Floating-point complex-by-complex multiplication
  94. * @param[in] pSrcA points to the first input vector
  95. * @param[in] pSrcB points to the second input vector
  96. * @param[out] pDst points to the output vector
  97. * @param[in] numSamples number of complex samples in each vector
  98. */
  99. void arm_cmplx_mult_cmplx_f16(
  100. const float16_t * pSrcA,
  101. const float16_t * pSrcB,
  102. float16_t * pDst,
  103. uint32_t numSamples);
  104. #endif /*defined(ARM_FLOAT16_SUPPORTED)*/
  105. #ifdef __cplusplus
  106. }
  107. #endif
  108. #endif /* ifndef _COMPLEX_MATH_FUNCTIONS_F16_H_ */