HPM SDK
HPMicro Software Development Kit
DSP Transform Functions

Functions

static int32_t hpm_dsp_cfft_rd2_f32 (float32_t *src, uint32_t m)
 cfft_rd2 of f32 vectors. More...
 
static int32_t hpm_dsp_cifft_rd2_f32 (float32_t *src, uint32_t m)
 cifft_rd2 of f32 vectors. More...
 
static int32_t hpm_dsp_cfft_rd2_q15 (q15_t *src, uint32_t m)
 cfft_rd2 of q15 vectors. More...
 
static int32_t hpm_dsp_cifft_rd2_q15 (q15_t *src, uint32_t m)
 cifft_rd2 of q15 vectors. More...
 
static int32_t hpm_dsp_cfft_rd2_q31 (q31_t *src, uint32_t m)
 cfft_rd2 of q31 vectors. More...
 
static int32_t hpm_dsp_cifft_rd2_q31 (q31_t *src, uint32_t m)
 cfft_rd2 of q31 vectors. More...
 
static int32_t hpm_dsp_cfft_rd4_f32 (float32_t *src, uint32_t m)
 cfft_rd4 of f32 vectors. More...
 
static int32_t hpm_dsp_cifft_rd4_f32 (float32_t *src, uint32_t m)
 cifft_rd4 of f32 vectors. More...
 
static int32_t hpm_dsp_cfft_rd4_q15 (q15_t *src, uint32_t m)
 cfft_rd4 of q15 vectors. More...
 
static int32_t hpm_dsp_cifft_rd4_q15 (q15_t *src, uint32_t m)
 cifft_rd4 of q15 vectors. More...
 
static int32_t hpm_dsp_cfft_rd4_q31 (q31_t *src, uint32_t m)
 cfft_rd4 of q31 vectors. More...
 
static int32_t hpm_dsp_cifft_rd4_q31 (q31_t *src, uint32_t m)
 cifft_rd4 of q31 vectors. More...
 
static void hpm_dsp_cfft_f32 (float32_t *src, uint32_t m)
 cfft of f32 vectors. More...
 
static void hpm_dsp_cfft_f64 (float64_t *src, uint32_t m)
 cfft of f64 vectors. More...
 
static void hpm_dsp_cifft_f32 (float32_t *src, uint32_t m)
 cifft of f32 vectors. More...
 
static void hpm_dsp_cifft_f64 (float64_t *src, uint32_t m)
 cifft of f64 vectors. More...
 
static void hpm_dsp_cfft_q15 (q15_t *src, uint32_t m)
 cfft of q15 vectors. More...
 
static void hpm_dsp_cifft_q15 (q15_t *src, uint32_t m)
 cifft of q15 vectors. More...
 
static void hpm_dsp_cfft_q31 (q31_t *src, uint32_t m)
 cfft of q31 vectors. More...
 
static void hpm_dsp_cifft_q31 (q31_t *src, uint32_t m)
 cifft of q31 vectors. More...
 
static int32_t hpm_dsp_rfft_f32 (float32_t *src, uint32_t m)
 rfft of f32 vectors. More...
 
static int32_t hpm_dsp_rfft_f64 (float64_t *src, uint32_t m)
 rfft of f64 vectors. More...
 
static int32_t hpm_dsp_rifft_f32 (float32_t *src, uint32_t m)
 rifft of f32 vectors. More...
 
static int32_t hpm_dsp_rifft_f64 (float64_t *src, uint32_t m)
 rifft of f64 vectors. More...
 
static int32_t hpm_dsp_rfft_q15 (q15_t *src, uint32_t m)
 rfft of q15 vectors. More...
 
static int32_t hpm_dsp_rifft_q15 (q15_t *src, uint32_t m)
 rifft of q15 vectors. More...
 
static int32_t hpm_dsp_rfft_q31 (q31_t *src, uint32_t m)
 rfft of q31 vectors. More...
 
static int32_t hpm_dsp_rifft_q31 (q31_t *src, uint32_t m)
 rifft of q31 vectors. More...
 
static void hpm_dsp_dct_f32 (float32_t *src, uint32_t m)
 
static void hpm_dsp_idct_f32 (float32_t *src, uint32_t m)
 
static void hpm_dsp_dct_q15 (q15_t *src, uint32_t m)
 
static void hpm_dsp_idct_q15 (q15_t *src, uint32_t m)
 
static void hpm_dsp_dct_q31 (q31_t *src, uint32_t m)
 
static void hpm_dsp_idct_q31 (q31_t *src, uint32_t m)
 
static void hpm_dsp_dct4_f32 (float32_t *src, uint32_t m)
 
static void hpm_dsp_idct4_f32 (float32_t *src, uint32_t m)
 
static void hpm_dsp_dct4_q15 (q15_t *src, uint32_t m)
 
static void hpm_dsp_idct4_q15 (q15_t *src, uint32_t m)
 
static void hpm_dsp_dct4_q31 (q31_t *src, uint32_t m)
 
static void hpm_dsp_idct4_q31 (q31_t *src, uint32_t m)
 
void hpm_software_cfft_float (float *src, uint32_t m)
 Software implementation does not depend on any hardware. More...
 

Detailed Description

Function Documentation

◆ hpm_dsp_cfft_f32()

static void hpm_dsp_cfft_f32 ( float32_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

cfft of f32 vectors.

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set from 3 to 13

Example

Given 128 samples (that is, FFT_LOGN = 7), the example of floating-point CFFT and
CIFFT is as follows:
     #define FFT_LOGN 7
     float32_t src[2* (1 << FFT_LOGN)] = {};
     int32_t ret;
     hpm_dsp_cfft_f32(src, FFT_LOGN);
     hpm_dsp_cifft_f32(src, FFT_LOGN);

This example also serves as a reference for examples of F16, F64, Q31 and Q15 CFFT and
CIFFT functions.
    

◆ hpm_dsp_cfft_f64()

static void hpm_dsp_cfft_f64 ( float64_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

cfft of f64 vectors.

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set from 3 to 13

◆ hpm_dsp_cfft_q15()

static void hpm_dsp_cfft_q15 ( q15_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

cfft of q15 vectors.

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set from 3 to 13

Note:

The input and output formats are listed below. To satisfy the input format corresponding to your input size, you may need to perform an arithmetic shift operation before calling this function.

◆ hpm_dsp_cfft_q31()

static void hpm_dsp_cfft_q31 ( q31_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

cfft of q31 vectors.

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set from 3 to 13

Note:

The input and output formats are listed below. To satisfy the input format corresponding to your input size, you may need to perform an arithmetic shift operation before calling this function.

◆ hpm_dsp_cfft_rd2_f32()

static int32_t hpm_dsp_cfft_rd2_f32 ( float32_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

cfft_rd2 of f32 vectors.

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set from 3 to 13
Returns
0 success; -1 failure

Example

Given 128 samples (that is, FFT_LOGN = 7), the example of floating-point Radix-2 CFFT and
CIFFT is as follows:
     #define FFT_LOGN 7
     float32_t src[2* (1 << FFT_LOGN)] = {};
     int32_t ret;
     ret = hpm_dsp_cfft_rd2_f32(src, FFT_LOGN);
     if (ret == 0)
         Success
     Else
         Fail
     ret = hpm_dsp_cifft_rd2_f32(src, FFT_LOGN);
     if (ret == 0)
          Success
     Else
          Fail

This example also serves as a reference for examples of Q31 and Q15 Radix-2 CFFT and
CIFFT functions.
    

◆ hpm_dsp_cfft_rd2_q15()

static int32_t hpm_dsp_cfft_rd2_q15 ( q15_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

cfft_rd2 of q15 vectors.

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set from 3 to 13
Returns
0 success; -1 failure

Note:

The input and output formats are listed below. To satisfy the input format corresponding to your input size, you may need to perform an arithmetic shift operation before calling this function.

◆ hpm_dsp_cfft_rd2_q31()

static int32_t hpm_dsp_cfft_rd2_q31 ( q31_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

cfft_rd2 of q31 vectors.

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set from 3 to 13
Returns
0 success; -1 failure

Note:

The input and output formats are listed below. To satisfy the input format corresponding to your input size, you may need to perform an arithmetic shift operation before calling this function.

◆ hpm_dsp_cfft_rd4_f32()

static int32_t hpm_dsp_cfft_rd4_f32 ( float32_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

cfft_rd4 of f32 vectors.

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set as 4, 6, 8 or 10
Returns
0 success; -1 failure

Example

Given 256 samples (that is, FFT_LOGN = 8), the example of floating-point Radix-4 CFFT and
CIFFT is as follows:
     #define FFT_LOGN 8
     float32_t src[2* (1 << FFT_LOGN)] = {};
     int32_t ret;
     ret = hpm_dsp_cfft_rd4_f32(src, FFT_LOGN);
     if (ret == 0)
         Success
     Else
         Fail
     ret = riscv_dsp_cifft_rd4_f32(src, FFT_LOGN);
     if (ret == 0)
         Success
     Else
         Fail

This example also serves as a reference for examples of Q31 or Q15 Radix-4 CFFT and
CIFFT functions.
    

◆ hpm_dsp_cfft_rd4_q15()

static int32_t hpm_dsp_cfft_rd4_q15 ( q15_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

cfft_rd4 of q15 vectors.

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set as 4, 6, 8 or 10
Returns
0 success; -1 failure

Note:

The input and output formats are listed below. To satisfy the input format corresponding to your input size, you may need to perform an arithmetic shift operation before calling this function.

◆ hpm_dsp_cfft_rd4_q31()

static int32_t hpm_dsp_cfft_rd4_q31 ( q31_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

cfft_rd4 of q31 vectors.

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set as 4, 6, 8 or 10
Returns
0 success; -1 failure

Note:

The input and output formats are listed below. To satisfy the input format corresponding to your input size, you may need to perform an arithmetic shift operation before calling this function.

◆ hpm_dsp_cifft_f32()

static void hpm_dsp_cifft_f32 ( float32_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

cifft of f32 vectors.

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set from 3 to 13

◆ hpm_dsp_cifft_f64()

static void hpm_dsp_cifft_f64 ( float64_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

cifft of f64 vectors.

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set from 3 to 13

◆ hpm_dsp_cifft_q15()

static void hpm_dsp_cifft_q15 ( q15_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

cifft of q15 vectors.

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set from 3 to 13

Note:

The input and output formats are listed below. To satisfy the input format corresponding to your input size, you may need to perform an arithmetic shift operation before calling this function.

◆ hpm_dsp_cifft_q31()

static void hpm_dsp_cifft_q31 ( q31_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

cifft of q31 vectors.

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set from 3 to 13

Note:

The input and output formats are listed below. To satisfy the input format corresponding to your input size, you may need to perform an arithmetic shift operation before calling this function.

◆ hpm_dsp_cifft_rd2_f32()

static int32_t hpm_dsp_cifft_rd2_f32 ( float32_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

cifft_rd2 of f32 vectors.

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set from 3 to 13
Returns
0 success; -1 failure

◆ hpm_dsp_cifft_rd2_q15()

static int32_t hpm_dsp_cifft_rd2_q15 ( q15_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

cifft_rd2 of q15 vectors.

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set from 3 to 13
Returns
0 success; -1 failure

Note:

The input and output formats are listed below. To satisfy the input format corresponding to your input size, you may need to perform an arithmetic shift operation before calling this function.

◆ hpm_dsp_cifft_rd2_q31()

static int32_t hpm_dsp_cifft_rd2_q31 ( q31_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

cfft_rd2 of q31 vectors.

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set from 3 to 13
Returns
0 success; -1 failure

Note:

The input and output formats are listed below. To satisfy the input format corresponding to your input size, you may need to perform an arithmetic shift operation before calling this function.

◆ hpm_dsp_cifft_rd4_f32()

static int32_t hpm_dsp_cifft_rd4_f32 ( float32_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

cifft_rd4 of f32 vectors.

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set as 4, 6, 8 or 10
Returns
0 success; -1 failure

◆ hpm_dsp_cifft_rd4_q15()

static int32_t hpm_dsp_cifft_rd4_q15 ( q15_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

cifft_rd4 of q15 vectors.

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set as 4, 6, 8 or 10
Returns
0 success; -1 failure

Note:

The input and output formats are listed below. To satisfy the input format corresponding to your input size, you may need to perform an arithmetic shift operation before calling this function.

◆ hpm_dsp_cifft_rd4_q31()

static int32_t hpm_dsp_cifft_rd4_q31 ( q31_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

cifft_rd4 of q31 vectors.

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set as 4, 6, 8 or 10
Returns
0 success; -1 failure

Note:

The input and output formats are listed below. To satisfy the input format corresponding to your input size, you may need to perform an arithmetic shift operation before calling this function.

◆ hpm_dsp_dct4_f32()

static void hpm_dsp_dct4_f32 ( float32_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set from 3 to 7

Example

Given 128 samples (that is, FFT_LOGN = 7), the example of floating-point DCT or IDCT type
IV transform is as follows:
     #define FFT_LOGN 7
     float32_t src[(1 << FFT_LOGN)] = {};
     riscv_dsp_dct4_f32(src, FFT_LOGN);
     riscv_dsp_idct4_f32(src, FFT_LOGN);
This example also serves as a reference for examples of Q31 or Q15 DCT type IV and IDCT
functions.
 

◆ hpm_dsp_dct4_q15()

static void hpm_dsp_dct4_q15 ( q15_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set from 3 to 7

Note:

The input and output formats are listed below. To satisfy the input format corresponding to your input size, you may need to perform an arithmetic shift operation before calling this function.

◆ hpm_dsp_dct4_q31()

static void hpm_dsp_dct4_q31 ( q31_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set from 3 to 7

Note:

The input and output formats are listed below. To satisfy the input format corresponding to your input size, you may need to perform an arithmetic shift operation before calling this function.

◆ hpm_dsp_dct_f32()

static void hpm_dsp_dct_f32 ( float32_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set from 3 to 8

Example

Given 256 samples (that is, FFT_LOGN = 8), the example of floating-point (DCT) type II and
IDCT is as follows:
     #define FFT_LOGN 8
     float32_t src[(1 << FFT_LOGN)] = {};
     riscv_dsp_dct_f32(src, FFT_LOGN);
     riscv_dsp_idct_f32(src, FFT_LOGN);
This example also serves as a reference for examples of Q31 or Q15 DCT type II and IDCT
functions.
 

◆ hpm_dsp_dct_q15()

static void hpm_dsp_dct_q15 ( q15_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set from 3 to 8

Note:

The input and output formats are listed below. To satisfy the input format corresponding to your input size, you may need to perform an arithmetic shift operation before calling this function.

◆ hpm_dsp_dct_q31()

static void hpm_dsp_dct_q31 ( q31_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set from 3 to 8

Note:

The input and output formats are listed below. To satisfy the input format corresponding to your input size, you may need to perform an arithmetic shift operation before calling this function.

◆ hpm_dsp_idct4_f32()

static void hpm_dsp_idct4_f32 ( float32_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set from 3 to 7

◆ hpm_dsp_idct4_q15()

static void hpm_dsp_idct4_q15 ( q15_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set from 3 to 7

Note:

The input and output formats are listed below. To satisfy the input format corresponding to your input size, you may need to perform an arithmetic shift operation before calling this function.

◆ hpm_dsp_idct4_q31()

static void hpm_dsp_idct4_q31 ( q31_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set from 3 to 7

Note:

The input and output formats are listed below. To satisfy the input format corresponding to your input size, you may need to perform an arithmetic shift operation before calling this function.

◆ hpm_dsp_idct_f32()

static void hpm_dsp_idct_f32 ( float32_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set from 3 to 8

◆ hpm_dsp_idct_q15()

static void hpm_dsp_idct_q15 ( q15_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set from 3 to 8

Note:

The input and output formats are listed below. To satisfy the input format corresponding to your input size, you may need to perform an arithmetic shift operation before calling this function.

◆ hpm_dsp_idct_q31()

static void hpm_dsp_idct_q31 ( q31_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set from 3 to 8

Note:

The input and output formats are listed below. To satisfy the input format corresponding to your input size, you may need to perform an arithmetic shift operation before calling this function.

◆ hpm_dsp_rfft_f32()

static int32_t hpm_dsp_rfft_f32 ( float32_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

rfft of f32 vectors.

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set from 4 to 14
Returns
0 success; -1 failure

Example

Given 128 samples (that is, FFT_LOGN = 7), the example of floating-point RFFT and RIFFT
is as follows:
     #define FFT_LOGN 7
     float32_t src[(1 << FFT_LOGN)] = {};
     int32_t ret;
     ret = hpm_dsp_rfft_f32(src, FFT_LOGN);
     if (ret == 0)
         Success
     else
         Fail
     ret = riscv_dsp_rifft_f32(src, FFT_LOGN);
     if (ret == 0)
         Success
     else
         Fail

This example also serves as a reference for examples of Q31 or Q15 RFFT and RIFFT
functions.
    

◆ hpm_dsp_rfft_f64()

static int32_t hpm_dsp_rfft_f64 ( float64_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

rfft of f64 vectors.

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set from 4 to 14
Returns
0 success; -1 failure

◆ hpm_dsp_rfft_q15()

static int32_t hpm_dsp_rfft_q15 ( q15_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

rfft of q15 vectors.

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set from 4 to 14
Returns
0 success; -1 failure

Note:

The input and output formats are listed below. To satisfy the input format corresponding to your input size, you may need to perform an arithmetic shift operation before calling this function.

◆ hpm_dsp_rfft_q31()

static int32_t hpm_dsp_rfft_q31 ( q31_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

rfft of q31 vectors.

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set from 4 to 14
Returns
0 success; -1 failure

Note:

The input and output formats are listed below. To satisfy the input format corresponding to your input size, you may need to perform an arithmetic shift operation before calling this function.

◆ hpm_dsp_rifft_f32()

static int32_t hpm_dsp_rifft_f32 ( float32_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

rifft of f32 vectors.

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set from 4 to 14
Returns
0 success; -1 failure

◆ hpm_dsp_rifft_f64()

static int32_t hpm_dsp_rifft_f64 ( float64_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

rifft of f64 vectors.

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set from 4 to 14
Returns
0 success; -1 failure

◆ hpm_dsp_rifft_q15()

static int32_t hpm_dsp_rifft_q15 ( q15_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

rifft of q15 vectors.

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set from 4 to 14
Returns
0 success; -1 failure

Note:

The input and output formats are listed below. To satisfy the input format corresponding to your input size, you may need to perform an arithmetic shift operation before calling this function.

◆ hpm_dsp_rifft_q31()

static int32_t hpm_dsp_rifft_q31 ( q31_t *  src,
uint32_t  m 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

rifft of q31 vectors.

Parameters
[in,out]srcpointer of the input vector. After the function is executed, the output will be stored in the input vector.
[in]mbase 2 logarithm value of the sample number and it can be set from 4 to 14
Returns
0 success; -1 failure

Note:

The input and output formats are listed below. To satisfy the input format corresponding to your input size, you may need to perform an arithmetic shift operation before calling this function.

◆ hpm_software_cfft_float()

void hpm_software_cfft_float ( float *  src,
uint32_t  m 
)

#include <middleware/hpm_math/hpm_math.h>

Software implementation does not depend on any hardware.

Construct a new hpm software cfft float object

Parameters
srcrequires double the space than other interfaces, 0-n for input data, n-2n for buffers, 0-n for output data
m2^n sampling points, including real and imaginary parts