#include <stdlib.h>
#include <string.h>
#include "riscv_math.h"
#include "riscv_const_structs.h"
#include <stdio.h>
#define TEST_LENGTH_SAMPLES 2048
extern float32_t testInput_f32_10khz[TEST_LENGTH_SAMPLES];
static float32_t testOutput[TEST_LENGTH_SAMPLES/2];
uint32_t fftSize = 1024;
uint32_t ifftFlag = 0;
uint32_t doBitReverse = 1;
uint32_t refIndex = 213, testIndex = 0;
int32_t main(void)
{
#if (defined(__riscv_vector))
__RV_CSR_SET(CSR_MSTATUS, 0x200);
#endif
#if defined(RISCV_MATH_VECTOR_ZVE32F)
if (tmp_buf != NULL && output_buf != NULL) {
memset(output_buf, 0, output_buf_size *
sizeof(
float32_t));
riscv_cfft_f32(&S, testInput_f32_10khz, output_buf, tmp_buf, ifftFlag);
free(tmp_buf);
free(output_buf);
} else {
}
#else
riscv_cfft_f32(&riscv_cfft_sR_f32_len1024, testInput_f32_10khz, ifftFlag, doBitReverse);
#endif
if (testIndex != refIndex)
{
}
{
printf("failed\n");
return 1;
}
printf("passed\n");
return 0;
}