Browse Source

Update doc and tools

- tools/dev: remove functions_undocumented.sh as we now have a
             (better) coccinelle version of the script

- doc: add missing functions
Nathalie Furmento 13 years ago
parent
commit
88e07aa8b7
3 changed files with 119 additions and 85 deletions
  1. 108 54
      doc/chapters/advanced-api.texi
  2. 11 0
      doc/chapters/basic-api.texi
  3. 0 31
      tools/dev/functions_undocumented.sh

+ 108 - 54
doc/chapters/advanced-api.texi

@@ -10,64 +10,13 @@
 @chapter StarPU Advanced API
 @chapter StarPU Advanced API
 
 
 @menu
 @menu
-* Task Bundles::                
 * Defining a new data interface::  
 * Defining a new data interface::  
 * Multiformat Data Interface::  
 * Multiformat Data Interface::  
+* Task Bundles::                
+* Task Lists::                
 * Defining a new scheduling policy::  
 * Defining a new scheduling policy::  
 @end menu
 @end menu
 
 
-@node Task Bundles
-@section Task Bundles
-
-@deftp {DataType} {struct starpu_task_bundle}
-The task bundle structure describes a list of tasks that should be
-scheduled together whenever possible. The different fields are:
-@table @asis
-@item @code{mutex} Mutex protecting the bundle
-@item @code{int previous_workerid} last worker previously assigned a task from the bundle (-1 if none)
-@item @code{struct starpu_task_bundle_entry *list} list of tasks
-@item @code{int destroy} If this flag is set, the bundle structure is automatically free'd when the bundle is deinitialized.
-@item @code{int closed} Is the bundle closed ?
-@end table
-@end deftp
-
-@deftypefun void starpu_task_bundle_init ({struct starpu_task_bundle *}@var{bundle})
-Initialize a task bundle
-@end deftypefun
-
-@deftypefun void starpu_task_bundle_deinit ({struct starpu_task_bundle *}@var{bundle})
-Deinitialize a bundle. In case the destroy flag is set, the bundle
-structure is freed too.
-@end deftypefun
-
-@deftypefun int starpu_task_bundle_insert ({struct starpu_task_bundle *}@var{bundle}, {struct starpu_task *}@var{task})
-Insert a task into a bundle.
-@end deftypefun
-
-@deftypefun int starpu_task_bundle_remove ({struct starpu_task_bundle *}@var{bundle}, {struct starpu_task *}@var{task})
-Remove a task from a bundle. This method must be called with
-bundle->mutex hold. This function returns 0 if the task was found,
--ENOENT if the element was not found, 1 if the element is found and if
-the list was deinitialized because it became empty.
-@end deftypefun
-
-@deftypefun void starpu_task_bundle_close ({struct starpu_task_bundle *}@var{bundle});
-Close a bundle. No task can be added to a closed bundle. A closed
-bundle automatically gets deinitialized when it becomes empty.
-@end deftypefun
-
-@deftypefun double starpu_task_bundle_expected_length ({struct starpu_task_bundle *}@var{bundle}, {enum starpu_perf_archtype} @var{arch}, unsigned @var{nimpl})
-Return the expected duration of the entire task bundle in µs.
-@end deftypefun
-
-@deftypefun double starpu_task_bundle_expected_data_transfer_time ({struct starpu_task_bundle *}@var{bundle}, unsigned {memory_node})
-Return the time (in µs) expected to transfer all data used within the bundle
-@end deftypefun
-
-@deftypefun double starpu_task_bundle_expected_power ({struct starpu_task_bundle *}@var{bundle},  {enum starpu_perf_archtype} @var{arch}, unsigned @var{nimpl})
-Return the expected power consumption of the entire task bundle in J.
-@end deftypefun
-
 @node Defining a new data interface
 @node Defining a new data interface
 @section Defining a new data interface
 @section Defining a new data interface
 
 
@@ -161,6 +110,101 @@ starpu_multiformat_data_register(handle, 0, &array_of_structs, NX, &format_ops);
 @end example
 @end example
 @end deftypefun
 @end deftypefun
 
 
+@node Task Bundles
+@section Task Bundles
+
+@deftp {DataType} {struct starpu_task_bundle}
+The task bundle structure describes a list of tasks that should be
+scheduled together whenever possible. The different fields are:
+@table @asis
+@item @code{mutex} Mutex protecting the bundle
+@item @code{int previous_workerid} last worker previously assigned a task from the bundle (-1 if none)
+@item @code{struct starpu_task_bundle_entry *list} list of tasks
+@item @code{int destroy} If this flag is set, the bundle structure is automatically free'd when the bundle is deinitialized.
+@item @code{int closed} Is the bundle closed ?
+@end table
+@end deftp
+
+@deftypefun void starpu_task_bundle_init ({struct starpu_task_bundle *}@var{bundle})
+Initialize a task bundle
+@end deftypefun
+
+@deftypefun void starpu_task_bundle_deinit ({struct starpu_task_bundle *}@var{bundle})
+Deinitialize a bundle. In case the destroy flag is set, the bundle
+structure is freed too.
+@end deftypefun
+
+@deftypefun int starpu_task_bundle_insert ({struct starpu_task_bundle *}@var{bundle}, {struct starpu_task *}@var{task})
+Insert a task into a bundle.
+@end deftypefun
+
+@deftypefun int starpu_task_bundle_remove ({struct starpu_task_bundle *}@var{bundle}, {struct starpu_task *}@var{task})
+Remove a task from a bundle. This method must be called with
+bundle->mutex hold. This function returns 0 if the task was found,
+-ENOENT if the element was not found, 1 if the element is found and if
+the list was deinitialized because it became empty.
+@end deftypefun
+
+@deftypefun void starpu_task_bundle_close ({struct starpu_task_bundle *}@var{bundle});
+Close a bundle. No task can be added to a closed bundle. A closed
+bundle automatically gets deinitialized when it becomes empty.
+@end deftypefun
+
+@deftypefun double starpu_task_bundle_expected_length ({struct starpu_task_bundle *}@var{bundle}, {enum starpu_perf_archtype} @var{arch}, unsigned @var{nimpl})
+Return the expected duration of the entire task bundle in µs.
+@end deftypefun
+
+@deftypefun double starpu_task_bundle_expected_data_transfer_time ({struct starpu_task_bundle *}@var{bundle}, unsigned {memory_node})
+Return the time (in µs) expected to transfer all data used within the bundle
+@end deftypefun
+
+@deftypefun double starpu_task_bundle_expected_power ({struct starpu_task_bundle *}@var{bundle},  {enum starpu_perf_archtype} @var{arch}, unsigned @var{nimpl})
+Return the expected power consumption of the entire task bundle in J.
+@end deftypefun
+
+@node Task Lists
+@section Task Lists
+
+@deftp {Data Type} {struct starpu_task_list}
+todo
+@end deftp
+
+@deftypefun void starpu_task_list_init ({struct starpu_task_list *}@var{list})
+Initialize a list structure
+@end deftypefun
+
+@deftypefun void starpu_task_list_push_front ({struct starpu_task_list *}@var{list}, {struct starpu_task *}@var{task})
+Push a task at the front of a list
+@end deftypefun
+
+@deftypefun void starpu_task_list_push_back ({struct starpu_task_list *}@var{list}, {struct starpu_task *}@var{task})
+Push a task at the back of a list
+@end deftypefun
+
+@deftypefun struct starpu_task *starpu_task_list_front ({struct starpu_task_list *}@var{list})
+Get the front of the list (without removing it)
+@end deftypefun
+
+@deftypefun struct starpu_task *starpu_task_list_back ({struct starpu_task_list *}@var{list})
+Get the back of the list (without removing it)
+@end deftypefun
+
+@deftypefun int starpu_task_list_empty ({struct starpu_task_list *}@var{list})
+Test if a list is empty
+@end deftypefun
+
+@deftypefun void starpu_task_list_erase ({struct starpu_task_list *}@var{list}, {struct starpu_task *}@var{task})
+Remove an element from the list
+@end deftypefun
+
+@deftypefun struct starpu_task *starpu_task_list_pop_front ({struct starpu_task_list *}@var{list})
+Remove the element at the front of the list
+@end deftypefun
+
+@deftypefun struct starpu_task *starpu_task_list_pop_back ({struct starpu_task_list *}@var{list})
+Remove the element at the back of the list
+@end deftypefun
+
 @node Defining a new scheduling policy
 @node Defining a new scheduling policy
 @section Defining a new scheduling policy
 @section Defining a new scheduling policy
 
 
@@ -236,7 +280,7 @@ called from the initialization method of the scheduling policy, and should not
 be used directly from the application.
 be used directly from the application.
 @end deftypefun
 @end deftypefun
 
 
-@deftypefun void starpu_sched_set_min_priority (int @var{max_prio})
+@deftypefun void starpu_sched_set_max_priority (int @var{max_prio})
 Defines the maximum priority level supported by the scheduling policy. The
 Defines the maximum priority level supported by the scheduling policy. The
 default maximum priority level is 1.  The application may access that value by
 default maximum priority level is 1.  The application may access that value by
 calling the @code{starpu_sched_get_max_priority} function. This function should
 calling the @code{starpu_sched_get_max_priority} function. This function should
@@ -244,6 +288,16 @@ only be called from the initialization method of the scheduling policy, and
 should not be used directly from the application.
 should not be used directly from the application.
 @end deftypefun
 @end deftypefun
 
 
+@deftypefun int starpu_sched_get_min_priority (void)
+Returns the current minimum priority level supported by the
+scheduling policy
+@end deftypefun
+
+@deftypefun int starpu_sched_get_max_priority (void)
+Returns the current maximum priority level supported by the
+scheduling policy
+@end deftypefun
+
 @deftypefun int starpu_push_local_task (int @var{workerid}, {struct starpu_task} *@var{task}, int @var{back})
 @deftypefun int starpu_push_local_task (int @var{workerid}, {struct starpu_task} *@var{task}, int @var{back})
 The scheduling policy may put tasks directly into a worker's local queue so
 The scheduling policy may put tasks directly into a worker's local queue so
 that it is not always necessary to create its own queue when the local queue
 that it is not always necessary to create its own queue when the local queue

+ 11 - 0
doc/chapters/basic-api.texi

@@ -1214,6 +1214,9 @@ because there is no task being executed at the moment.
 Output on @code{stderr} some statistics on the codelet @var{cl}.
 Output on @code{stderr} some statistics on the codelet @var{cl}.
 @end deftypefun
 @end deftypefun
 
 
+@deftypefun int starpu_task_wait_for_no_ready (void)
+This function waits until there is no more ready task.
+@end deftypefun
 
 
 @c Callbacks : what can we put in callbacks ?
 @c Callbacks : what can we put in callbacks ?
 
 
@@ -1404,6 +1407,10 @@ returned.
 Return the current profiling status or a negative value in case there was an error.
 Return the current profiling status or a negative value in case there was an error.
 @end deftypefun
 @end deftypefun
 
 
+@deftypefun void starpu_set_profiling_id (int @var{new_id})
+This function sets the ID used for profiling trace filename
+@end deftypefun
+
 @deftp {Data Type} {struct starpu_task_profiling_info}
 @deftp {Data Type} {struct starpu_task_profiling_info}
 This structure contains information about the execution of a task. It is
 This structure contains information about the execution of a task. It is
 accessible from the @code{.profiling_info} field of the @code{starpu_task}
 accessible from the @code{.profiling_info} field of the @code{starpu_task}
@@ -1460,6 +1467,10 @@ TODO
 @end table
 @end table
 @end deftp
 @end deftp
 
 
+@deftypefun int starpu_bus_get_profiling_info (int @var{busid}, {struct starpu_bus_profiling_info *}@var{bus_info})
+todo
+@end deftypefun
+
 @deftypefun int starpu_bus_get_count (void)
 @deftypefun int starpu_bus_get_count (void)
 TODO
 TODO
 @end deftypefun
 @end deftypefun

+ 0 - 31
tools/dev/functions_undocumented.sh

@@ -1,31 +0,0 @@
-#!/bin/bash
-
-# StarPU --- Runtime system for heterogeneous multicore architectures.
-#
-# Copyright (C) 2011  Centre National de la Recherche Scientifique
-#
-# StarPU is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation; either version 2.1 of the License, or (at
-# your option) any later version.
-#
-# StarPU is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-#
-# See the GNU Lesser General Public License in COPYING.LGPL for more details.
-
-stcolor=$(tput sgr0)
-redcolor=$(tput setaf 1)
-
-functions=$(grep 'starpu.*(.*);' include/*.h | awk -F':' '{print $2}' | sed 's/(.*//' | sed 's/.* //'| tr -d ' ' | tr -d '*')
-
-for func in $functions ; do
-    #echo Processing function $func
-    x=$(grep $func doc/starpu.texi doc/chapters/*texi | grep deftypefun)
-    if test "$x" == "" ; then
-        echo "Error. Function ${redcolor}${func}${stcolor} is not (or incorrectly) documented"
-    fi
-done
-
-