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