FFT Support

## Functions

void * | starpufft_malloc (size_t n)
void | starpufft_free (void *p)
starpufft_plan | starpufft_plan_dft_1d (int n, int sign, unsigned flags)
starpufft_plan | starpufft_plan_dft_2d (int n, int m, int sign, unsigned flags)
struct starpu_task * | starpufft_start (starpufft_plan p, void *in, void *out)
struct starpu_task * | starpufft_start_handle (starpufft_plan p, starpu_data_handle_t in, starpu_data_handle_t out)
int | starpufft_execute (starpufft_plan p, void *in, void *out)
int | starpufft_execute_handle (starpufft_plan p, starpu_data_handle_t in, starpu_data_handle_t out)
void | starpufft_cleanup (starpufft_plan p)
void | starpufft_destroy_plan (starpufft_plan p)

## Detailed Description

## Function Documentation

## starpufft_malloc()

void * starpufft_malloc | ( | size_t | n | ) |

Allocate memory for `n` bytes. This is preferred over `malloc()`, since it allocates pinned memory, which allows overlapped transfers.

## starpufft_free()

void * starpufft_free | ( | void * | p | ) |

Release memory previously allocated.

## starpufft_plan_dft_1d()

struct starpufft_plan * starpufft_plan_dft_1d | ( | int | n,
|  | int | sign,
|  | unsigned | flags
| ) |  |

Initialize a plan for 1D FFT of size `n`. `sign` can be STARPUFFT_FORWARD or STARPUFFT_INVERSE. `flags` must be 0.

## starpufft_plan_dft_2d()

struct starpufft_plan * starpufft_plan_dft_2d | ( | int | n,
|  | int | m,
|  | int | sign,
|  | unsigned | flags
| ) |  |

Initialize a plan for 2D FFT of size (`n`, `m`). `sign` can be STARPUFFT_FORWARD or STARPUFFT_INVERSE. flags must be `0`.

## starpufft_start()

struct starpu_task * starpufft_start | ( | starpufft_plan | p,
|  | void * | in,
|  | void * | out
| ) |  |

Start an FFT previously planned as `p`, using `in` and `out` as input and output. This only submits the task and does not wait for it. The application should call starpufft_cleanup() to unregister the

## starpufft_start_handle()

struct starpu_task * starpufft_start_handle | ( | starpufft_plan | p,
|  | starpu_data_handle_t | in,
|  | starpu_data_handle_t | out
| ) |  |

Start an FFT previously planned as `p`, using data handles `in` and `out` as input and output (assumed to be vectors of elements of the expected types). This only submits the task and does not wait for it.

## starpufft_execute()

void starpufft_execute | ( | starpufft_plan | p,
|  | void * | in,
|  | void * | out
| ) |  |

Execute an FFT previously planned as `p`, using `in` and `out` as input and output. This submits and waits for the task.

## starpufft_execute_handle()

void starpufft_execute_handle | ( | starpufft_plan | p,
|  | starpu_data_handle_t | in,
|  | starpu_data_handle_t | out
| ) |  |

Execute an FFT previously planned as `p`, using data handles `in` and `out` as input and output (assumed to be vectors of elements of the expected types). This submits and waits for the task.

## starpufft_cleanup()

void starpufft_cleanup | ( | starpufft_plan | p | ) |

Release data for plan `p`, in the starpufft_start() case.

## starpufft_destroy_plan()

void starpufft_destroy_plan | ( | starpufft_plan | p | ) |

Destroy plan `p`, i.e. release all CPU (fftw) and GPU (cufft) resources.