RENEWLab  1.1.0
RENEW project
fft.h File Reference
#include <stddef.h>
Include dependency graph for fft.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MUFFT_RESTRICT
 Portable variant of C99 restrict keyword. More...
 
#define MUFFT_FORWARD   (-1)
 The forward FFT transform. More...
 
#define MUFFT_INVERSE   (1)
 The inverse FFT transform. More...
 
#define MUFFT_FLAG_CPU_ANY   (0)
 muFFT will use any SIMD instruction set it can if supported by the CPU. More...
 
#define MUFFT_FLAG_CPU_NO_SIMD   ((1 << 16) - 1)
 muFFT will not use any SIMD instruction set. More...
 
#define MUFFT_FLAG_CPU_NO_AVX   (1 << 0)
 muFFT will not use the AVX instruction set. More...
 
#define MUFFT_FLAG_CPU_NO_SSE3   (1 << 1)
 muFFT will not use the SSE3 instruction set. More...
 
#define MUFFT_FLAG_CPU_NO_SSE   (1 << 2)
 muFFT will not use the SSE instruction set. More...
 
#define MUFFT_FLAG_FULL_R2C   (1 << 16)
 The real-to-complex 1D transform will also output the redundant conjugate values X(N - k) = X(k)*. More...
 
#define MUFFT_FLAG_ZERO_PAD_UPPER_HALF   (1 << 17)
 
#define MUFFT_CONV_METHOD_FLAG_MONO_MONO   0
 The convolution will convolve a single channel of data with a single channel filter. More...
 
#define MUFFT_CONV_METHOD_FLAG_STEREO_MONO   1
 
#define MUFFT_CONV_METHOD_FLAG_ZERO_PAD_UPPER_HALF_FIRST   (1 << 2)
 The first block is assumed to be zero padded as defined by MUFFT_FLAG_ZERO_PAD_UPPER_HALF. More...
 
#define MUFFT_CONV_METHOD_FLAG_ZERO_PAD_UPPER_HALF_SECOND   (1 << 3)
 The second block is assumed to be zero padded as defined by MUFFT_FLAG_ZERO_PAD_UPPER_HALF. More...
 
#define MUFFT_CONV_BLOCK_FIRST   0
 The first block. More...
 
#define MUFFT_CONV_BLOCK_SECOND   1
 The second block. More...
 

Typedefs

typedef struct mufft_plan_1d mufft_plan_1d
 Opaque type representing a 1D FFT. More...
 
typedef struct mufft_plan_conv mufft_plan_conv
 Opaque type representing a plan to convolve data. More...
 
typedef void(* mufft_convolve_func) (void *output, const void *a, const void *b, float normalization, unsigned samples)
 Vector complex multiply routine signature. More...
 
typedef struct mufft_plan_2d mufft_plan_2d
 Opaque type representing a 2D FFT. More...
 

Functions

mufft_plan_1dmufft_create_plan_1d_c2c (unsigned N, int direction, unsigned flags)
 Create a plan for a 1D complex-to-complex inverse or forward FFT. More...
 
mufft_plan_1dmufft_create_plan_1d_r2c (unsigned N, unsigned flags)
 Create a plan for real-to-complex forward transform. More...
 
mufft_plan_1dmufft_create_plan_1d_c2r (unsigned N, unsigned flags)
 Create a plan for complex-to-real inverse transform. More...
 
void mufft_execute_plan_1d (mufft_plan_1d *plan, void *output, const void *input)
 Executes a 1D FFT plan. More...
 
void mufft_free_plan_1d (mufft_plan_1d *plan)
 Free a previously allocated 1D FFT plan. More...
 
mufft_plan_convmufft_create_plan_conv (unsigned N, unsigned flags, unsigned method)
 Create a plan to convolve zero-padded input data of length N with zero-padded input data of length N. More...
 
void mufft_execute_conv_input (mufft_plan_conv *plan, unsigned block, void *output, const void *input)
 Applies forward FFT of either first or second input block. More...
 
size_t mufft_conv_get_transformed_block_size (mufft_plan_conv *plan)
 Queries the buffer size for intermediate FFT blocks. More...
 
void mufft_execute_conv_output (mufft_plan_conv *plan, void *output, const void *input_first, const void *input_second)
 Multiply together FFTs of the two input arrays obtained from mufft_execute_conv_input and perform a normalized inverse FFT. More...
 
void mufft_free_plan_conv (mufft_plan_conv *plan)
 Free a previously allocated convolution plan obtained from mufft_create_plan_conv. More...
 
mufft_convolve_func mufft_get_convolve_func (unsigned flags)
 Gets a function pointer which implements complex multiplication (convolution in frequency domain). More...
 
mufft_plan_2dmufft_create_plan_2d_c2c (unsigned Nx, unsigned Ny, int direction, unsigned flags)
 Create a plan for a 2D complex-to-complex inverse or forward FFT. More...
 
mufft_plan_2dmufft_create_plan_2d_r2c (unsigned Nx, unsigned Ny, unsigned flags)
 Create a plan for a 2D real-to-complex forward FFT. More...
 
mufft_plan_2dmufft_create_plan_2d_c2r (unsigned Nx, unsigned Ny, unsigned flags)
 Create a plan for a 2D complex-to-real inverse FFT. More...
 
void mufft_execute_plan_2d (mufft_plan_2d *plan, void *output, const void *input)
 Executes a 2D FFT plan. More...
 
void mufft_free_plan_2d (mufft_plan_2d *plan)
 Free a previously allocated 2D FFT plan. More...
 
void * mufft_alloc (size_t size)
 Allocate aligned storage suitable for muFFT. Must be freed with mufft_free. More...
 
void * mufft_calloc (size_t size)
 Allocate zeroed out aligned storage suitable for muFFT. Same as calloc(), but aligned. Must be freed with mufft_free. More...
 
void mufft_free (void *ptr)
 Free previously allocated storage obtained from mufft_alloc or mufft_calloc. More...
 

Detailed Description

muFFT public API

Macro Definition Documentation

◆ MUFFT_RESTRICT

#define MUFFT_RESTRICT

Portable variant of C99 restrict keyword.