complex_math_functions_f16.h 4.0 KB

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