Просмотр исходного кода

Add documentation for libstarpufft

Samuel Thibault лет назад: 13
Родитель
Сommit
54f635308d
3 измененных файлов с 97 добавлено и 1 удалено
  1. 2 1
      doc/Makefile.am
  2. 88 0
      doc/chapters/fft-support.texi
  3. 7 0
      doc/starpu.texi

+ 2 - 1
doc/Makefile.am

@@ -1,6 +1,6 @@
 # StarPU --- Runtime system for heterogeneous multicore architectures.
 #
-# Copyright (C) 2009  Université de Bordeaux 1
+# Copyright (C) 2009, 2011  Université de Bordeaux 1
 # Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
 #
 # Permission is granted to copy, distribute and/or modify this document
@@ -30,6 +30,7 @@ starpu_TEXINFOS = chapters/advanced-api.texi \
 	chapters/vector_scal_opencl_codelet.texi \
 	chapters/c-extensions.texi \
 	chapters/mpi-support.texi \
+	chapters/fft-support.texi \
 	chapters/using.texi \
 	chapters/vector_scal_opencl.texi
 

+ 88 - 0
doc/chapters/fft-support.texi

@@ -0,0 +1,88 @@
+@c -*-texinfo-*-
+
+@c This file is part of the StarPU Handbook.
+@c Copyright (C) 2009--2011  Universit@'e de Bordeaux 1
+@c Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
+@c Copyright (C) 2011 Institut National de Recherche en Informatique et Automatique
+@c See the file starpu.texi for copying conditions.
+
+@node StarPU FFT support
+@chapter StarPU FFT support
+
+StarPU provides @code{libstarpufft}, a library whose design is very similar to
+both fftw and cufft, the difference being that it takes benefit from both CPUs
+and GPUs. It should however be noted that GPUs do not have the same precision as
+CPUs, so the results may different by a negligible amount
+
+float, double and long double precisions are available, with the fftw naming
+convention:
+
+@enumerate
+@item double precision structures and functions are named e.g. @code{starpufft_execute}
+@item float precision structures and functions are named e.g. @code{starpufftf_execute}
+@item long double precision structures and functions are named e.g. @code{starpufftl_execute}
+@end enumerate
+
+The documentation below uses names for double precision, replace
+@code{starpufft_} with @code{starpufftf_} or @code{starpufftl_} as appropriate.
+
+Only complex numbers are supported at the moment.
+
+The application has to call @code{starpu_init} before calling starpufft functions.
+
+@subsection Compilation
+
+The flags required to compile or link against the FFT library are accessible
+with the following commands:
+
+@example
+% pkg-config --cflags libstarpufft  # options for the compiler
+% pkg-config --libs libstarpufft    # options for the linker
+@end example
+
+@subsection Initialisation
+
+@deftypefun {void *} starpufft_malloc (size_t @var{n})
+Allocates memory for @var{n} bytes. This is preferred over @code{malloc}, since
+it allocates pinned memory, which allows overlapped transfers.
+@end deftypefun
+
+@deftypefun {void *} starpufft_free (void *@var{p})
+Release memory previously allocated.
+@end deftypefun
+
+@deftypefun {struct starpufft_plan *} starpufft_plan_dft_1d (int @var{n}, int @var{sign}, unsigned @var{flags})
+Initializes a plan for 1D FFT of size @var{n}. @var{sign} can be
+@code{STARPUFFT_FORWARD} or @code{STARPUFFT_INVERSE}. @var{flags} must be 0.
+@end deftypefun
+
+@deftypefun {struct starpufft_plan *} starpufft_plan_dft_2d (int @var{n}, int @var{m}, int @var{sign}, unsigned @var{flags})
+Initializes a plan for 2D FFT of size (@var{n}, @var{m}). @var{sign} can be
+@code{STARPUFFT_FORWARD} or @code{STARPUFFT_INVERSE}. @var{flags} must be 0.
+@end deftypefun
+
+@deftypefun {struct starpu_task *} starpufft_start (starpufft_plan @var{p}, void *@var{in}, void *@var{out})
+Start an FFT previously planned as @var{p}, using @var{in} and @var{out} as
+input and output. This only submits the task and does not wait for it.
+@end deftypefun
+
+@deftypefun {struct starpu_task *} starpufft_start_handle (starpufft_plan @var{p}, starpu_data_handle_t @var{in}, starpu_data_handle_t @var{out})
+Start an FFT previously planned as @var{p}, using data handles @var{in} and
+@var{out} as input and output (assumed to be vectors of elements of the expected
+types). This only submits the task and does not wait for it.
+@end deftypefun
+
+@deftypefun void starpufft_execute (starpufft_plan @var{p}, void *@var{in}, void *@var{out})
+Execute an FFT previously planned as @var{p}, using @var{in} and @var{out} as
+input and output. This submits and waits for the task.
+@end deftypefun
+
+@deftypefun void starpufft_execute_handle (starpufft_plan @var{p}, starpu_data_handle_t @var{in}, starpu_data_handle_t @var{out})
+Execute an FFT previously planned as @var{p}, using data handles @var{in} and
+@var{out} as input and output (assumed to be vectors of elements of the expected
+types). This submits and waits for the task.
+@end deftypefun
+
+@deftypefun void starpufft_destroy_plan (starpufft_plan @var{p})
+Destroys plan @var{p}, i.e. release all CPU (fftw) and GPU (cufft) resources.
+@end deftypefun

+ 7 - 0
doc/starpu.texi

@@ -75,6 +75,7 @@ was last updated on @value{UPDATED}.
 * Tips and Tricks::             Tips and tricks to know about
 * Configuring StarPU::          How to configure StarPU
 * StarPU MPI support::          How to combine StarPU with MPI
+* StarPU FFT support::          How to perform FFT computations with StarPU
 * C Extensions::                Easier StarPU programming with GCC
 * Full source code for the 'Scaling a Vector' example::
 * GNU Free Documentation License::    How you can copy and share this manual.
@@ -155,6 +156,12 @@ was last updated on @value{UPDATED}.
 @include chapters/mpi-support.texi
 
 @c ---------------------------------------------------------------------
+@c FFT support
+@c ---------------------------------------------------------------------
+
+@include chapters/fft-support.texi
+
+@c ---------------------------------------------------------------------
 @c C Extensions
 @c ---------------------------------------------------------------------