5#ifndef SPLIB_FFTPLUGIN_H
6#define SPLIB_FFTPLUGIN_H
8#include <sp/spPluginP.h>
15#define SP_PLUGIN_FFT "FFT 1.2"
17#define SP_FFT_PLUGIN_CAPS_SUPPORT_BATCH (1<<(SP_PLUGIN_CAPS_USER_SHIFT))
19typedef struct _spFFTPluginRec spFFTPluginRec;
31 spBool (*init)(
const char *lang);
36 void *(*init_instance)(
const char *lang);
37 spBool (*free_instance)(
void *instance);
38 spOptions (*init_options)(
void *instance,
const char *lang);
41 spBool (*get_num_unit)(
void *instance,
int *num_unit);
42 const char *(*get_unit_name)(
void *instance,
int index);
43 spBool (*select_unit)(
void *instance,
int index);
45 spBool (*is_precision_supported)(
void *instance, spFFTPrecision precision,
spFFTSpeed *speed);
47 spBool (*set_other_info)(
void *instance,
const char *id,
char *data);
48 spBool (*get_other_info)(
void *instance,
const char *id,
char *data);
50 void *(*init_fft)(
void *instance,
long order,
long batch, spFFTPrecision precision);
51 spBool (*free_fft)(
void *instance,
void *fftrec);
52 spBool (*reset_fft_order)(
void *instance,
void *fftrec,
long order);
54 spBool (*exec_fftf)(
void *instance,
void *fftrec,
float *real,
float *imag,
int inv);
55 spBool (*exec_fft)(
void *instance,
void *fftrec,
double *real,
double *imag,
int inv);
57 spBool (*exec_real_fftf)(
void *instance,
void *fftrec,
float *data,
int inv);
58 spBool (*exec_real_fft)(
void *instance,
void *fftrec,
double *data,
int inv);
62 spBool (*exec_fft_powerf)(
void *instance,
void *fftrec,
float *data,
float exponent);
63 spBool (*exec_fft_power)(
void *instance,
void *fftrec,
double *data,
double exponent);
66#define SpFFTRecPluginRec(fftrec) ((spFFTPluginRec *)fftrec->plugin->rec)
71extern spBool spExecFFTF_Plugin(
spFFTRec fftrec,
float *real,
float *imag,
int inv);
72extern spBool spExecFFT_Plugin(
spFFTRec fftrec,
double *real,
double *imag,
int inv);
73extern spBool spExecRealFFTF_Plugin(
spFFTRec fftrec,
float *data,
int inv);
74extern spBool spExecRealFFT_Plugin(
spFFTRec fftrec,
double *data,
int inv);
75extern spBool spExecFFTPowerF_Plugin(
spFFTRec fftrec,
float *data,
float exponent);
76extern spBool spExecFFTPower_Plugin(
spFFTRec fftrec,
double *data,
double exponent);
A class to handle FFT execution.
#define spFFTSpeed
Definition fft.h:24
struct _spOptions * spOptions