Browse Source

doc: be more explicit on how to initialise a codelet

Nathalie Furmento 12 years ago
parent
commit
db28916999
2 changed files with 3 additions and 1 deletions
  1. 1 0
      doc/chapters/api.texi
  2. 2 1
      doc/chapters/basic-examples.texi

+ 1 - 0
doc/chapters/api.texi

@@ -1933,6 +1933,7 @@ Define the name of the codelet. This can be useful for debugging purposes.
 @end deftp
 @end deftp
 
 
 @deftypefun void starpu_codelet_init ({struct starpu_codelet} *@var{cl})
 @deftypefun void starpu_codelet_init ({struct starpu_codelet} *@var{cl})
+@anchor{starpu_codelet_init}
 Initialize @var{cl} with default values. Codelets should preferably be
 Initialize @var{cl} with default values. Codelets should preferably be
 initialized statically as shown in @ref{Defining a Codelet}. However
 initialized statically as shown in @ref{Defining a Codelet}. However
 such a initialisation is not always possible, e.g. when using C++.
 such a initialisation is not always possible, e.g. when using C++.

+ 2 - 1
doc/chapters/basic-examples.texi

@@ -140,7 +140,8 @@ struct starpu_codelet cl =
 A codelet is a structure that represents a computational kernel. Such a codelet
 A codelet is a structure that represents a computational kernel. Such a codelet
 may contain an implementation of the same kernel on different architectures
 may contain an implementation of the same kernel on different architectures
 (e.g. CUDA, x86, ...). For compatibility, make sure that the whole
 (e.g. CUDA, x86, ...). For compatibility, make sure that the whole
-structure is initialized to zero, either by using memset, or by letting the
+structure is properly initialized to zero, either by using the
+function starpu_codelet_init (@pxref{starpu_codelet_init}), or by letting the
 compiler implicitly do it as examplified above.
 compiler implicitly do it as examplified above.
 
 
 The @code{nbuffers} field specifies the number of data buffers that are
 The @code{nbuffers} field specifies the number of data buffers that are