StarPU Handbook

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Functions
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

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

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

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

Release memory previously allocated.

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

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

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

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

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

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.

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.

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.

void starpufft_cleanup | ( | starpufft_plan | p | ) |

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

void starpufft_destroy_plan | ( | starpufft_plan | p | ) |

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