fft-support.texi 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. @c -*-texinfo-*-
  2. @c This file is part of the StarPU Handbook.
  3. @c Copyright (C) 2009--2011 Universit@'e de Bordeaux 1
  4. @c Copyright (C) 2010, 2011, 2012, 2013 Centre National de la Recherche Scientifique
  5. @c Copyright (C) 2011 Institut National de Recherche en Informatique et Automatique
  6. @c See the file starpu.texi for copying conditions.
  7. StarPU provides @code{libstarpufft}, a library whose design is very similar to
  8. both fftw and cufft, the difference being that it takes benefit from both CPUs
  9. and GPUs. It should however be noted that GPUs do not have the same precision as
  10. CPUs, so the results may different by a negligible amount.
  11. Different precisions are available, namely float, double and long
  12. double precisions, with the following fftw naming conventions:
  13. @enumerate
  14. @item double precision structures and functions are named e.g. @code{starpufft_execute}
  15. @item float precision structures and functions are named e.g. @code{starpufftf_execute}
  16. @item long double precision structures and functions are named e.g. @code{starpufftl_execute}
  17. @end enumerate
  18. The documentation below is given with names for double precision, replace
  19. @code{starpufft_} with @code{starpufftf_} or @code{starpufftl_} as appropriate.
  20. Only complex numbers are supported at the moment.
  21. The application has to call @code{starpu_init} before calling starpufft functions.
  22. Either main memory pointers or data handles can be provided.
  23. @enumerate
  24. @item To provide main memory pointers, use @code{starpufft_start} or
  25. @code{starpufft_execute}. Only one FFT can be performed at a time, because
  26. StarPU will have to register the data on the fly. In the @code{starpufft_start}
  27. case, @code{starpufft_cleanup} needs to be called to unregister the data.
  28. @item To provide data handles (which is preferrable),
  29. use @code{starpufft_start_handle} (preferred) or
  30. @code{starpufft_execute_handle}. Several FFTs Several FFT tasks can be submitted
  31. for a given plan, which permits e.g. to start a series of FFT with just one
  32. plan. @code{starpufft_start_handle} is preferrable since it does not wait for
  33. the task completion, and thus permits to enqueue a series of tasks.
  34. @end enumerate
  35. All functions are defined in @ref{FFT Support}.
  36. @section Compilation
  37. The flags required to compile or link against the FFT library are accessible
  38. with the following commands:
  39. @example
  40. $ pkg-config --cflags starpufft-1.0 # options for the compiler
  41. $ pkg-config --libs starpufft-1.0 # options for the linker
  42. @end example
  43. Also pass the @code{--static} option if the application is to be linked statically.