fft_support.doxy 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2009-2020 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  4. *
  5. * StarPU is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU Lesser General Public License as published by
  7. * the Free Software Foundation; either version 2.1 of the License, or (at
  8. * your option) any later version.
  9. *
  10. * StarPU is distributed in the hope that it will be useful, but
  11. * WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. *
  14. * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  15. */
  16. /*! \defgroup API_FFT_Support FFT Support
  17. \def STARPUFFT_FORWARD
  18. \ingroup API_FFT_Support
  19. todo
  20. \def STARPUFFT_INVERSE
  21. \ingroup API_FFT_Support
  22. todo
  23. \fn void * starpufft_malloc(size_t n)
  24. \ingroup API_FFT_Support
  25. Allocate memory for \p n bytes. This is preferred over \c malloc(),
  26. since it allocates pinned memory, which allows overlapped transfers.
  27. \fn void * starpufft_free(void *p)
  28. \ingroup API_FFT_Support
  29. Release memory previously allocated.
  30. \fn struct starpufft_plan * starpufft_plan_dft_1d(int n, int sign, unsigned flags)
  31. \ingroup API_FFT_Support
  32. Initialize a plan for 1D FFT of size \p n. \p sign can be STARPUFFT_FORWARD
  33. or STARPUFFT_INVERSE. \p flags must be 0.
  34. \fn struct starpufft_plan * starpufft_plan_dft_2d(int n, int m, int sign, unsigned flags)
  35. \ingroup API_FFT_Support
  36. Initialize a plan for 2D FFT of size (\p n, \p m). \p sign can be
  37. STARPUFFT_FORWARD or STARPUFFT_INVERSE. flags must be \p 0.
  38. \fn struct starpu_task * starpufft_start(starpufft_plan p, void *in, void *out)
  39. \ingroup API_FFT_Support
  40. Start an FFT previously planned as \p p, using \p in and \p out as
  41. input and output. This only submits the task and does not wait for it.
  42. The application should call starpufft_cleanup() to unregister the
  43. \fn struct starpu_task * starpufft_start_handle(starpufft_plan p, starpu_data_handle_t in, starpu_data_handle_t out)
  44. \ingroup API_FFT_Support
  45. Start an FFT previously planned as \p p, using data handles \p in and
  46. \p out as input and output (assumed to be vectors of elements of the
  47. expected types). This only submits the task and does not wait for it.
  48. \fn void starpufft_execute(starpufft_plan p, void *in, void *out)
  49. \ingroup API_FFT_Support
  50. Execute an FFT previously planned as \p p, using \p in and \p out as
  51. input and output. This submits and waits for the task.
  52. \fn void starpufft_execute_handle(starpufft_plan p, starpu_data_handle_t in, starpu_data_handle_t out)
  53. \ingroup API_FFT_Support
  54. Execute an FFT previously planned as \p p, using data handles \p in
  55. and \p out as input and output (assumed to be vectors of elements of
  56. the expected types). This submits and waits for the task.
  57. \fn void starpufft_cleanup(starpufft_plan p)
  58. \ingroup API_FFT_Support
  59. Release data for plan \p p, in the starpufft_start() case.
  60. \fn void starpufft_destroy_plan(starpufft_plan p)
  61. \ingroup API_FFT_Support
  62. Destroy plan \p p, i.e. release all CPU (fftw) and GPU (cufft)
  63. resources.
  64. */