420_fft_support.doxy 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2009-2021 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. /*! \page FFTSupport FFT Support
  17. StarPU provides <c>libstarpufft</c>, a library whose design is very similar to
  18. both <c>fftw</c> and <c>cufft</c>, the difference being that it takes benefit from both CPUs
  19. and GPUs. It should however be noted that GPUs do not have the same precision as
  20. CPUs, so the results may different by a negligible amount.
  21. Different precisions are available, namely \c float, \c double and <c>long
  22. double</c> precisions, with the following \c fftw naming conventions:
  23. <ul>
  24. <li>
  25. double precision structures and functions are named e.g. starpufft_execute()
  26. </li>
  27. <li>
  28. float precision structures and functions are named e.g. starpufftf_execute()
  29. </li>
  30. <li>
  31. long double precision structures and functions are named e.g. starpufftl_execute()
  32. </li>
  33. </ul>
  34. The documentation below is given with names for double precision, replace
  35. <c>starpufft_</c> with <c>starpufftf_</c> or <c>starpufftl_</c> as appropriate.
  36. Only complex numbers are supported at the moment.
  37. The application has to call starpu_init() before calling <c>starpufft</c> functions.
  38. Either main memory pointers or data handles can be provided.
  39. <ul>
  40. <li>
  41. To provide main memory pointers, use starpufft_start() or
  42. starpufft_execute(). Only one FFT can be performed at a time, because
  43. StarPU will have to register the data on the fly. In the starpufft_start()
  44. case, starpufft_cleanup() needs to be called to unregister the data.
  45. </li>
  46. <li>
  47. To provide data handles (which is preferrable),
  48. use starpufft_start_handle() (preferred) or
  49. starpufft_execute_handle(). Several FFTs tasks can be submitted
  50. for a given plan, which permits e.g. to start a series of FFT with just one
  51. plan. starpufft_start_handle() is preferrable since it does not wait for
  52. the task completion, and thus permits to enqueue a series of tasks.
  53. </li>
  54. </ul>
  55. All functions are defined in \ref API_FFT_Support.
  56. \section FFTCompilation Compilation
  57. The flags required to compile or link against the FFT library are accessible
  58. with the following commands:
  59. \verbatim
  60. $ pkg-config --cflags starpufft-1.3 # options for the compiler
  61. $ pkg-config --libs starpufft-1.3 # options for the linker
  62. \endverbatim
  63. Also pass the option <c>--static</c> if the application is to be linked statically.
  64. */