Commit 633ab591 authored by Silfurion's avatar Silfurion Committed by Christophe Favergeon
Browse files

Add Conversion functions from and to 64 bit floating point

Cleaned f64 conversion functions.
parent 60e1e88f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ jobs:

      - name: Install doxygen 1.9.2
        run: |
          wget https://doxygen.nl/files/doxygen-1.9.2.linux.bin.tar.gz
          wget https://sourceforge.net/projects/doxygen/files/rel-1.9.2/doxygen-1.9.2.linux.bin.tar.gz/download
          sudo tar -C /opt -xf doxygen-1.9.2.linux.bin.tar.gz
          sudo ln -s /opt/doxygen-1.9.2/bin/doxygen /usr/local/bin/
          which doxygen
+89 −2
Original line number Diff line number Diff line
/******************************************************************************
 * @file     support_functions.h
 * @brief    Public header file for CMSIS DSP Library
 * @version  V1.10.0
 * @date     08 July 2021
 * @version  V1.10.1
 * @date     18 August 2022
 * Target Processor: Cortex-M and Cortex-A cores
 ******************************************************************************/
/*
@@ -43,6 +43,63 @@ extern "C"
 */


/**
   * @brief Converts the elements of the 64 bit floating-point vector to floating-point vector.
   * @param[in]  pSrc       points to the floating-point 64 input vector
   * @param[out] pDst       points to the floating-point output vector
   * @param[in]  blockSize  length of the input vector
   */
  void arm_f64_to_float(
  const float64_t * pSrc,
        float32_t * pDst,
        uint32_t blockSize);

/**
   * @brief Converts the elements of the 64 bit floating-point vector to Q31 vector.
   * @param[in]  pSrc       points to the floating-point 64 input vector
   * @param[out] pDst       points to the Q31 output vector
   * @param[in]  blockSize  length of the input vector
   */
  void arm_f64_to_q31(
  const float64_t * pSrc,
        q31_t * pDst,
        uint32_t blockSize);

/**
   * @brief Converts the elements of the 64 bit floating-point vector to Q15 vector.
   * @param[in]  pSrc       points to the floating-point 64 input vector
   * @param[out] pDst       points to the Q15 output vector
   * @param[in]  blockSize  length of the input vector
   */
  void arm_f64_to_q15(
  const float64_t * pSrc,
        q15_t * pDst,
        uint32_t blockSize);

/**
   * @brief Converts the elements of the 64 bit floating-point vector to Q7 vector.
   * @param[in]  pSrc       points to the floating-point 64 input vector
   * @param[out] pDst       points to the Q7 output vector
   * @param[in]  blockSize  length of the input vector
   */
  void arm_f64_to_q7(
  const float64_t * pSrc,
        q7_t * pDst,
        uint32_t blockSize);



/**
   * @brief Converts the elements of the floating-point  vector to 64 bit floating-point  vector.
   * @param[in]  pSrc       points to the floating-point input vector
   * @param[out] pDst       points to the 64 bit floating-point output vector
   * @param[in]  blockSize  length of the input vector
   */
  void arm_float_to_f64(
  const float32_t * pSrc,
        float64_t * pDst,
        uint32_t blockSize);

/**
   * @brief Converts the elements of the floating-point vector to Q31 vector.
   * @param[in]  pSrc       points to the floating-point input vector
@@ -78,6 +135,16 @@ extern "C"
        q7_t * pDst,
        uint32_t blockSize);

/**
 * @brief  Converts the elements of the Q31 vector to 64 bit floating-point vector.
 * @param[in]  pSrc       is input pointer
 * @param[out] pDst       is output pointer
 * @param[in]  blockSize  is the number of samples to process
 */
void arm_q31_to_f64(
const q31_t * pSrc,
      float64_t * pDst,
      uint32_t blockSize);

  /**
   * @brief  Converts the elements of the Q31 vector to floating-point vector.
@@ -114,6 +181,16 @@ extern "C"
        q7_t * pDst,
        uint32_t blockSize);

/**
 * @brief  Converts the elements of the Q15 vector to 64 bit floating-point vector.
 * @param[in]  pSrc       is input pointer
 * @param[out] pDst       is output pointer
 * @param[in]  blockSize  is the number of samples to process
 */
void arm_q15_to_f64(
const q15_t * pSrc,
      float64_t * pDst,
      uint32_t blockSize);

  /**
   * @brief  Converts the elements of the Q15 vector to floating-point vector.
@@ -150,6 +227,16 @@ extern "C"
        q7_t * pDst,
        uint32_t blockSize);

/**
 * @brief  Converts the elements of the Q7 vector to 64 bit floating-point vector.
 * @param[in]  pSrc       is input pointer
 * @param[out] pDst       is output pointer
 * @param[in]  blockSize  is the number of samples to process
 */
void arm_q7_to_f64(
const q7_t * pSrc,
      float64_t * pDst,
      uint32_t blockSize);

  /**
   * @brief  Converts the elements of the Q7 vector to floating-point vector.
+17 −2
Original line number Diff line number Diff line
/******************************************************************************
 * @file     support_functions_f16.h
 * @brief    Public header file for CMSIS DSP Library
 * @version  V1.10.0
 * @date     08 July 2021
 * @version  V1.10.1
 * @date     18 August 2022
 * Target Processor: Cortex-M and Cortex-A cores
 ******************************************************************************/
/*
@@ -72,6 +72,21 @@ void arm_f16_to_q15(const float16_t * pSrc, q15_t * pDst, uint32_t blockSize);
   */
void arm_q15_to_f16(const q15_t * pSrc, float16_t * pDst, uint32_t blockSize);

/**
   * @brief Converts the elements of the 64 bit floating-point vector to 16 bit floating-point vector.
   * @param[in]  pSrc       points to the f64 input vector
   * @param[out] pDst       points to the f16 output vector
   * @param[in]  blockSize  length of the input vector
   */
void arm_f64_to_f16(const float64_t * pSrc, float16_t * pDst, uint32_t blockSize);

/**
   * @brief Converts the elements of the 16 bit floating-point vector to 64 bit floating-point vector.
   * @param[in]  pSrc       points to the f16 input vector
   * @param[out] pDst       points to the f64 output vector
   * @param[in]  blockSize  length of the input vector
   */
void arm_f16_to_f64(const float16_t * pSrc, float64_t * pDst, uint32_t blockSize);

/**
   * @brief Converts the elements of the floating-point vector to Q31 vector.
+10 −0
Original line number Diff line number Diff line
@@ -18,6 +18,11 @@ SupportFunctions/arm_fill_f64.c
SupportFunctions/arm_fill_q15.c
SupportFunctions/arm_fill_q31.c
SupportFunctions/arm_fill_q7.c
SupportFunctions/arm_f64_to_float.c
SupportFunctions/arm_f64_to_q31.c
SupportFunctions/arm_f64_to_q15.c
SupportFunctions/arm_f64_to_q7.c
SupportFunctions/arm_float_to_f64.c
SupportFunctions/arm_float_to_q15.c
SupportFunctions/arm_float_to_q31.c
SupportFunctions/arm_float_to_q7.c
@@ -25,12 +30,15 @@ SupportFunctions/arm_heap_sort_f32.c
SupportFunctions/arm_insertion_sort_f32.c
SupportFunctions/arm_merge_sort_f32.c
SupportFunctions/arm_merge_sort_init_f32.c
SupportFunctions/arm_q15_to_f64.c
SupportFunctions/arm_q15_to_float.c
SupportFunctions/arm_q15_to_q31.c
SupportFunctions/arm_q15_to_q7.c
SupportFunctions/arm_q31_to_f64.c
SupportFunctions/arm_q31_to_float.c
SupportFunctions/arm_q31_to_q15.c
SupportFunctions/arm_q31_to_q7.c
SupportFunctions/arm_q7_to_f64.c
SupportFunctions/arm_q7_to_float.c
SupportFunctions/arm_q7_to_q15.c
SupportFunctions/arm_q7_to_q31.c
@@ -53,5 +61,7 @@ target_sources(CMSISDSP PRIVATE SupportFunctions/arm_float_to_f16.c)
target_sources(CMSISDSP PRIVATE SupportFunctions/arm_f16_to_float.c)
target_sources(CMSISDSP PRIVATE SupportFunctions/arm_weighted_sum_f16.c)
target_sources(CMSISDSP PRIVATE SupportFunctions/arm_barycenter_f16.c)
target_sources(CMSISDSP PRIVATE SupportFunctions/arm_f16_to_f64.c)
target_sources(CMSISDSP PRIVATE SupportFunctions/arm_f64_to_f16.c)
endif()
+10 −2
Original line number Diff line number Diff line
@@ -3,8 +3,8 @@
 * Title:        SupportFunctions.c
 * Description:  Combination of all support function source files.
 *
 * $Date:        16. March 2020
 * $Revision:    V1.1.0
 * $Date:        18 August 2022
 * $Revision:    V1.1.1
 *
 * Target Processor: Cortex-M cores
 * -------------------------------------------------------------------- */
@@ -49,15 +49,23 @@
#include "arm_sort_init_f32.c"
#include "arm_weighted_sum_f32.c"

#include "arm_f64_to_float.c"
#include "arm_f64_to_q31.c"
#include "arm_f64_to_q15.c"
#include "arm_f64_to_q7.c"
#include "arm_float_to_f64.c"
#include "arm_float_to_q15.c"
#include "arm_float_to_q31.c"
#include "arm_float_to_q7.c"
#include "arm_q15_to_f64.c"
#include "arm_q15_to_float.c"
#include "arm_q15_to_q31.c"
#include "arm_q15_to_q7.c"
#include "arm_q31_to_f64.c"
#include "arm_q31_to_float.c"
#include "arm_q31_to_q15.c"
#include "arm_q31_to_q7.c"
#include "arm_q7_to_f64.c"
#include "arm_q7_to_float.c"
#include "arm_q7_to_q15.c"
#include "arm_q7_to_q31.c"
Loading