/ Drivers / CMSIS / DSP / Include / dsp / complex_math_functions_f16.h
complex_math_functions_f16.h
  1  /******************************************************************************
  2   * @file     complex_math_functions_f16.h
  3   * @brief    Public header file for CMSIS DSP Library
  4   * @version  V1.9.0
  5   * @date     23 April 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  
 26   
 27  #ifndef _COMPLEX_MATH_FUNCTIONS_F16_H_
 28  #define _COMPLEX_MATH_FUNCTIONS_F16_H_
 29  
 30  #include "arm_math_types_f16.h"
 31  #include "arm_math_memory.h"
 32  
 33  #include "dsp/none.h"
 34  #include "dsp/utils.h"
 35  #include "dsp/fast_math_functions_f16.h"
 36  
 37  #ifdef   __cplusplus
 38  extern "C"
 39  {
 40  #endif
 41  
 42  #if defined(ARM_FLOAT16_SUPPORTED)
 43  
 44   /**
 45     * @brief  Floating-point complex conjugate.
 46     * @param[in]  pSrc        points to the input vector
 47     * @param[out] pDst        points to the output vector
 48     * @param[in]  numSamples  number of complex samples in each vector
 49     */
 50    void arm_cmplx_conj_f16(
 51    const float16_t * pSrc,
 52          float16_t * pDst,
 53          uint32_t numSamples);
 54  
 55   /**
 56     * @brief  Floating-point complex magnitude squared
 57     * @param[in]  pSrc        points to the complex input vector
 58     * @param[out] pDst        points to the real output vector
 59     * @param[in]  numSamples  number of complex samples in the input vector
 60     */
 61    void arm_cmplx_mag_squared_f16(
 62    const float16_t * pSrc,
 63          float16_t * pDst,
 64          uint32_t numSamples);
 65  
 66    /**
 67     * @brief  Floating-point complex magnitude
 68     * @param[in]  pSrc        points to the complex input vector
 69     * @param[out] pDst        points to the real output vector
 70     * @param[in]  numSamples  number of complex samples in the input vector
 71     */
 72    void arm_cmplx_mag_f16(
 73    const float16_t * pSrc,
 74          float16_t * pDst,
 75          uint32_t numSamples);
 76  
 77    /**
 78     * @brief  Floating-point complex dot product
 79     * @param[in]  pSrcA       points to the first input vector
 80     * @param[in]  pSrcB       points to the second input vector
 81     * @param[in]  numSamples  number of complex samples in each vector
 82     * @param[out] realResult  real part of the result returned here
 83     * @param[out] imagResult  imaginary part of the result returned here
 84     */
 85    void arm_cmplx_dot_prod_f16(
 86    const float16_t * pSrcA,
 87    const float16_t * pSrcB,
 88          uint32_t numSamples,
 89          float16_t * realResult,
 90          float16_t * imagResult);
 91  
 92     /**
 93     * @brief  Floating-point complex-by-real multiplication
 94     * @param[in]  pSrcCmplx   points to the complex input vector
 95     * @param[in]  pSrcReal    points to the real input vector
 96     * @param[out] pCmplxDst   points to the complex output vector
 97     * @param[in]  numSamples  number of samples in each vector
 98     */
 99    void arm_cmplx_mult_real_f16(
100    const float16_t * pSrcCmplx,
101    const float16_t * pSrcReal,
102          float16_t * pCmplxDst,
103          uint32_t numSamples);
104  
105    /**
106     * @brief  Floating-point complex-by-complex multiplication
107     * @param[in]  pSrcA       points to the first input vector
108     * @param[in]  pSrcB       points to the second input vector
109     * @param[out] pDst        points to the output vector
110     * @param[in]  numSamples  number of complex samples in each vector
111     */
112    void arm_cmplx_mult_cmplx_f16(
113    const float16_t * pSrcA,
114    const float16_t * pSrcB,
115          float16_t * pDst,
116          uint32_t numSamples);
117  
118  #endif /*defined(ARM_FLOAT16_SUPPORTED)*/
119  #ifdef   __cplusplus
120  }
121  #endif
122  
123  #endif /* ifndef _COMPLEX_MATH_FUNCTIONS_F16_H_ */