Browse Source

fix prototypes

Nathalie Furmento 12 years ago
parent
commit
15ee499aea

+ 9 - 9
doc/chapters/advanced-api.texi

@@ -542,7 +542,7 @@ This function creates a scheduling context which uses the scheduling policy indi
 The return value represents the identifier of the context that has just been created. It will be further used to indicate the context the tasks will be submitted to. The return value should be at most @code{STARPU_NMAX_SCHED_CTXS}.
 @end deftypefun
 
-@deftypefun void starpu_delete_sched_ctx (unsigned @var{sched_ctx_id}, unsigned @var{inheritor_sched_ctx_id}) 
+@deftypefun void starpu_delete_sched_ctx (unsigned @var{sched_ctx_id}, unsigned @var{inheritor_sched_ctx_id})
 Delete scheduling context @var{sched_ctx_id} and lets scheduling context @var{inheritor_sched_ctx_id} take over its workers.
 @end deftypefun
 
@@ -554,8 +554,8 @@ This function adds dynamically the workers indicated in the first argument to th
 This function removes the workers indicated in the first argument from the context indicated in the last argument. The last argument cannot be greater than  @code{STARPU_NMAX_SCHED_CTXS}.
 @end deftypefun
 
-A scheduling context manages a collection of workers that can be memorized using different data structures. Thus, a generic structure is available in order to simplify the choice of its type. 
-Only the list data structure is available but further data structures(like tree) implementations are foreseen. 
+A scheduling context manages a collection of workers that can be memorized using different data structures. Thus, a generic structure is available in order to simplify the choice of its type.
+Only the list data structure is available but further data structures(like tree) implementations are foreseen.
 
 @deftp {Data Type} {struct starpu_sched_ctx_worker_collection}
 @table @asis
@@ -566,7 +566,7 @@ The number of workerids
 @item @code{pthread_key_t cursor_key} (optional)
 The cursor needed to iterate the collection (depending on the data structure)
 @item @code{int type}
-The type of structure (currently WORKER_LIST is the only one available) 
+The type of structure (currently WORKER_LIST is the only one available)
 @item @code{unsigned (*has_next)(struct starpu_sched_ctx_worker_collection *workers)}
 Checks if there is a next worker
 @item @code{int (*get_next)(struct starpu_sched_ctx_worker_collection *workers)}
@@ -594,7 +594,7 @@ Creates a worker collection of the type indicated by the last parameter for the
 @deftypefun void starpu_delete_worker_collection_for_sched_ctx (unsigned @var{sched_ctx_id})
 Deletes the worker collection of the specified scheduling context
 @end deftypefun
- 
+
 @deftypefun struct starpu_sched_ctx_worker_collection* starpu_get_worker_collection_of_sched_ctx (unsigned @var{sched_ctx_id})
 Returns the worker collection managed by the indicated context
 @end deftypefun
@@ -696,7 +696,7 @@ Description of the policy.
 @end table
 @end deftp
 
-@deftypefun void starpu_worker_set_sched_condition (unsigned @var{sched_ctx_id}, int @var{workerid}, {pthread_cond_t *}@var{sched_cond}, pthread_mutex_t *@var{sched_mutex})
+@deftypefun void starpu_worker_set_sched_condition (unsigned @var{sched_ctx_id}, int @var{workerid}, pthread_mutex_t *@var{sched_mutex}, {pthread_cond_t *}@var{sched_cond})
 This function specifies the condition variable associated to a worker per context
 When there is no available task for a worker, StarPU blocks this worker on a
 condition variable. This function specifies which condition variable (and the
@@ -708,13 +708,13 @@ The initialization method of a scheduling strategy (@code{init_sched}) must
 call this function once per worker.
 @end deftypefun
 
-@deftypefun void starpu_worker_get_sched_condition (unsigned @var{sched_ctx_id}, int @var{workerid}, {pthread_cond_t **}@var{sched_cond}, {pthread_mutex_t **}@var{sched_mutex})
+@deftypefun void starpu_worker_get_sched_condition (unsigned @var{sched_ctx_id}, int @var{workerid}, {pthread_mutex_t **}@var{sched_mutex}, {pthread_cond_t **}@var{sched_cond})
 This function returns the condition variables associated to a worker in a context
 It is used in the policy to access to the local queue of the worker
 @end deftypefun
 
-@deftypefun void starpu_set_sched_ctx_policy_data (unsigned @var{sched_ctx}, {void*} @var{policy_data})
-Each scheduling policy uses some specific data (queues, variables, additional condition variables). 
+@deftypefun void starpu_set_sched_ctx_policy_data (unsigned @var{sched_ctx_id}, {void *} @var{policy_data})
+Each scheduling policy uses some specific data (queues, variables, additional condition variables).
 It is memorize through a local structure. This function assigns it to a scheduling context.
 @end deftypefun
 

+ 7 - 7
doc/chapters/sched_ctx_hypervisor.texi

@@ -27,7 +27,7 @@ Basic strategies of resizing scheduling contexts already exist but a platform fo
 @section Managing the hypervisor
 There is a single hypervisor that is in charge of resizing contexts and the resizing strategy is chosen at the initialization of the hypervisor. A single resize can be done at a time.
 
-@deftypefun struct starpu_performance_counters* sched_ctx_hypervisor_init ({struct starpu_sched_ctx_hypervisor_policy*} @var{policy})
+@deftypefun struct starpu_performance_counters* sched_ctx_hypervisor_init ({struct starpu_sched_ctx_hypervisor_policy *} @var{policy})
 Initializes the hypervisor to use the strategy provided as parameter and creates the performance counters (see @pxref{Performance Counters}).
 These performance counters represent actually some callbacks that will be used by the contexts to notify the information needed by the hypervisor.
 @end deftypefun
@@ -341,15 +341,15 @@ If the value corresponding to a worker is 1, this one is taken into account in t
 
 The following functions can be used in the resizing strategies.
 
-@deftypefun void sched_ctx_hypervisor_move_workers (unsigned @var{sender_sched_ctx}, unsigned @var{receier_sched_ctx}, {int *}@var{workers_to_move}, unsigned @var{nworkers_to_move});
+@deftypefun void sched_ctx_hypervisor_move_workers (unsigned @var{sender_sched_ctx}, unsigned @var{receiver_sched_ctx}, {int *}@var{workers_to_move}, unsigned @var{nworkers_to_move}, unsigned @var{now});
 Moves workers from one context to another
 @end deftypefun
 
-@deftypefun {struct starpu_sched_ctx_hypervisor_policy_config*} sched_ctx_hypervisor_get_config (unsigned @var{sched_ctx});
+@deftypefun {struct starpu_sched_ctx_hypervisor_policy_config *} sched_ctx_hypervisor_get_config (unsigned @var{sched_ctx});
 Returns the configuration structure of a context
 @end deftypefun
 
-@deftypefun {int*} sched_ctx_hypervisor_get_sched_ctxs ();
+@deftypefun {int *} sched_ctx_hypervisor_get_sched_ctxs ();
 Gets the contexts managed by the hypervisor
 @end deftypefun
 
@@ -357,15 +357,15 @@ Gets the contexts managed by the hypervisor
 Gets the number of contexts managed by the hypervisor
 @end deftypefun
 
-@deftypefun {struct starpu_sched_ctx_hypervisor_wrapper*} sched_ctx_hypervisor_get_wrapper (unsigned @var{sched_ctx});
+@deftypefun {struct starpu_sched_ctx_hypervisor_wrapper *} sched_ctx_hypervisor_get_wrapper (unsigned @var{sched_ctx});
 Returns the wrapper corresponding the context @code{sched_ctx}
 @end deftypefun
 
-@deftypefun double sched_ctx_hypervisor_get_elapsed_flops_per_sched_ctx ({struct starpu_sched_ctx_hypervisor_wrapper*} @var{sc_w});
+@deftypefun double sched_ctx_hypervisor_get_elapsed_flops_per_sched_ctx ({struct starpu_sched_ctx_hypervisor_wrapper *} @var{sc_w});
 Returns the flops of a context elapsed from the last resize
 @end deftypefun
 
-@deftypefun {char*} sched_ctx_hypervisor_get_policy ();
+@deftypefun {char *} sched_ctx_hypervisor_get_policy ();
 Returns the name of the resizing policy the hypervisor uses
 @end deftypefun
 

+ 1 - 1
include/starpu.h

@@ -237,7 +237,7 @@ void starpu_worker_get_name(int id, char *dst, size_t maxlen);
 int starpu_worker_get_devid(int id);
 void starpu_profiling_init();
 void starpu_display_stats();
-int starpu_driver_run(struct starpu_driver *);
+int starpu_driver_run(struct starpu_driver *d);
 void starpu_drivers_request_termination(void);
 
 int starpu_driver_init(struct starpu_driver *d);

+ 6 - 6
include/starpu_sched_ctx.h

@@ -76,7 +76,7 @@ void starpu_call_poped_task_cb(int workerid, unsigned sched_ctx_id, double flops
 void starpu_call_pushed_task_cb(int workerid, unsigned sched_ctx_id);
 #endif //STARPU_USE_SCHED_CTX_HYPERVISOR
 
-unsigned starpu_create_sched_ctx(const char *policy_name, int *workerids_ctx, int nworkers_ctx, const char *sched_name);
+unsigned starpu_create_sched_ctx(const char *policy_name, int *workerids_ctx, int nworkers_ctx, const char *sched_ctx_name);
 
 unsigned starpu_create_sched_ctx_inside_interval(const char *policy_name, const char *sched_name,
 						 int min_ncpus, int max_ncpus, int min_ngpus, int max_ngpus,
@@ -88,17 +88,17 @@ void starpu_add_workers_to_sched_ctx(int *workerids_ctx, int nworkers_ctx, unsig
 
 void starpu_remove_workers_from_sched_ctx(int *workerids_ctx, int nworkers_ctx, unsigned sched_ctx);
 
-void starpu_set_sched_ctx_policy_data(unsigned sched_ctx, void* policy_data);
+void starpu_set_sched_ctx_policy_data(unsigned sched_ctx_id, void *policy_data);
 
 void* starpu_get_sched_ctx_policy_data(unsigned sched_ctx);
 
-void starpu_worker_set_sched_condition(unsigned sched_ctx, int workerid, pthread_mutex_t *sched_mutex, pthread_cond_t *sched_cond);
+void starpu_worker_set_sched_condition(unsigned sched_ctx_id, int workerid, pthread_mutex_t *sched_mutex, pthread_cond_t *sched_cond);
 
-void starpu_worker_get_sched_condition(unsigned sched_ctx, int workerid, pthread_mutex_t **sched_mutex, pthread_cond_t **sched_cond);
+void starpu_worker_get_sched_condition(unsigned sched_ctx_id, int workerid, pthread_mutex_t **sched_mutex, pthread_cond_t **sched_cond);
 
-void starpu_worker_init_sched_condition(unsigned sched_ctx, int workerid);
+void starpu_worker_init_sched_condition(unsigned sched_ctx_id, int workerid);
 
-void starpu_worker_deinit_sched_condition(unsigned sched_ctx, int workerid);
+void starpu_worker_deinit_sched_condition(unsigned sched_ctx_id, int workerid);
 
 struct starpu_sched_ctx_worker_collection* starpu_create_worker_collection_for_sched_ctx(unsigned sched_ctx_id, int type);
 

+ 7 - 7
sched_ctx_hypervisor/include/sched_ctx_hypervisor.h

@@ -120,7 +120,7 @@ struct starpu_sched_ctx_hypervisor_policy
 	void (*handle_submitted_job)(struct starpu_task *task, unsigned footprint);
 };
 
-struct starpu_performance_counters* sched_ctx_hypervisor_init(struct starpu_sched_ctx_hypervisor_policy* policy);
+struct starpu_performance_counters* sched_ctx_hypervisor_init(struct starpu_sched_ctx_hypervisor_policy *policy);
 
 void sched_ctx_hypervisor_shutdown(void);
 
@@ -130,7 +130,7 @@ void sched_ctx_hypervisor_unregister_ctx(unsigned sched_ctx);
 
 void sched_ctx_hypervisor_resize(unsigned sched_ctx, int task_tag);
 
-void sched_ctx_hypervisor_move_workers(unsigned sender_sched_ctx, unsigned receier_sched_ctx, int *workers_to_move, unsigned nworkers_to_move, unsigned now);
+void sched_ctx_hypervisor_move_workers(unsigned sender_sched_ctx, unsigned receiver_sched_ctx, int *workers_to_move, unsigned nworkers_to_move, unsigned now);
 
 void sched_ctx_hypervisor_stop_resize(unsigned sched_ctx);
 
@@ -140,21 +140,21 @@ void sched_ctx_hypervisor_ioctl(unsigned sched_ctx, ...);
 
 void sched_ctx_hypervisor_set_config(unsigned sched_ctx, void *config);
 
-struct starpu_sched_ctx_hypervisor_policy_config* sched_ctx_hypervisor_get_config(unsigned sched_ctx);
+struct starpu_sched_ctx_hypervisor_policy_config *sched_ctx_hypervisor_get_config(unsigned sched_ctx);
 
-int* sched_ctx_hypervisor_get_sched_ctxs();
+int *sched_ctx_hypervisor_get_sched_ctxs();
 
 int sched_ctx_hypervisor_get_nsched_ctxs();
 
 int get_nworkers_ctx(unsigned sched_ctx, enum starpu_archtype arch);
 
-struct starpu_sched_ctx_hypervisor_wrapper* sched_ctx_hypervisor_get_wrapper(unsigned sched_ctx);
+struct starpu_sched_ctx_hypervisor_wrapper *sched_ctx_hypervisor_get_wrapper(unsigned sched_ctx);
 
-double sched_ctx_hypervisor_get_elapsed_flops_per_sched_ctx(struct starpu_sched_ctx_hypervisor_wrapper* sc_w);
+double sched_ctx_hypervisor_get_elapsed_flops_per_sched_ctx(struct starpu_sched_ctx_hypervisor_wrapper *sc_w);
 
 double sched_ctx_hypervisor_get_total_elapsed_flops_per_sched_ctx(struct starpu_sched_ctx_hypervisor_wrapper* sc_w);
 
-const char* sched_ctx_hypervisor_get_policy();
+const char *sched_ctx_hypervisor_get_policy();
 
 void sched_ctx_hypervisor_add_workers_to_sched_ctx(int* workers_to_add, unsigned nworkers_to_add, unsigned sched_ctx);