fft_support.doxy 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. * This file is part of the StarPU Handbook.
  3. * Copyright (C) 2009--2011 Universit@'e de Bordeaux
  4. * Copyright (C) 2010, 2011, 2012, 2013, 2017 CNRS
  5. * Copyright (C) 2011, 2012 INRIA
  6. * See the file version.doxy for copying conditions.
  7. */
  8. /*! \defgroup API_FFT_Support FFT Support
  9. \def STARPUFFT_FORWARD
  10. \ingroup API_FFT_Support
  11. todo
  12. \def STARPUFFT_INVERSE
  13. \ingroup API_FFT_Support
  14. todo
  15. \fn void * starpufft_malloc(size_t n)
  16. \ingroup API_FFT_Support
  17. Allocate memory for \p n bytes. This is preferred over \c malloc(),
  18. since it allocates pinned memory, which allows overlapped transfers.
  19. \fn void * starpufft_free(void *p)
  20. \ingroup API_FFT_Support
  21. Release memory previously allocated.
  22. \fn struct starpufft_plan * starpufft_plan_dft_1d(int n, int sign, unsigned flags)
  23. \ingroup API_FFT_Support
  24. Initialize a plan for 1D FFT of size \p n. \p sign can be STARPUFFT_FORWARD
  25. or STARPUFFT_INVERSE. \p flags must be 0.
  26. \fn struct starpufft_plan * starpufft_plan_dft_2d(int n, int m, int sign, unsigned flags)
  27. \ingroup API_FFT_Support
  28. Initialize a plan for 2D FFT of size (\p n, \p m). \p sign can be
  29. STARPUFFT_FORWARD or STARPUFFT_INVERSE. flags must be \p 0.
  30. \fn struct starpu_task * starpufft_start(starpufft_plan p, void *in, void *out)
  31. \ingroup API_FFT_Support
  32. Start an FFT previously planned as \p p, using \p in and \p out as
  33. input and output. This only submits the task and does not wait for it.
  34. The application should call starpufft_cleanup() to unregister the
  35. \fn struct starpu_task * starpufft_start_handle(starpufft_plan p, starpu_data_handle_t in, starpu_data_handle_t out)
  36. \ingroup API_FFT_Support
  37. Start an FFT previously planned as \p p, using data handles \p in and
  38. \p out as input and output (assumed to be vectors of elements of the
  39. expected types). This only submits the task and does not wait for it.
  40. \fn void starpufft_execute(starpufft_plan p, void *in, void *out)
  41. \ingroup API_FFT_Support
  42. Execute an FFT previously planned as \p p, using \p in and \p out as
  43. input and output. This submits and waits for the task.
  44. \fn void starpufft_execute_handle(starpufft_plan p, starpu_data_handle_t in, starpu_data_handle_t out)
  45. \ingroup API_FFT_Support
  46. Execute an FFT previously planned as \p p, using data handles \p in
  47. and \p out as input and output (assumed to be vectors of elements of
  48. the expected types). This submits and waits for the task.
  49. \fn void starpufft_cleanup(starpufft_plan p)
  50. \ingroup API_FFT_Support
  51. Release data for plan \p p, in the starpufft_start() case.
  52. \fn void starpufft_destroy_plan(starpufft_plan p)
  53. \ingroup API_FFT_Support
  54. Destroy plan \p p, i.e. release all CPU (fftw) and GPU (cufft)
  55. resources.
  56. */