Bläddra i källkod

include: remove documentation as it is already defined elsewhere

Nathalie Furmento 12 år sedan
förälder
incheckning
18d8babd7a

+ 0 - 9
include/starpu.h

@@ -87,9 +87,7 @@ struct starpu_conf
 	int ncpus;
 	int ncuda;
 	int nopencl;
-	/* number of MIC device workers (-1 for default) */
 	int nmic;
-	/* number of SCC device workers (-1 for default) */
 	int nscc;
 
 	unsigned use_explicit_workers_bindid;
@@ -112,14 +110,11 @@ struct starpu_conf
 
 	int single_combined_worker;
 
-	/* Path to the kernel to execute on the MIC device, compiled
-	 * for MIC architecture. */
 	char *mic_sink_program_path;
 
 	int disable_asynchronous_copy;
 	int disable_asynchronous_cuda_copy;
 	int disable_asynchronous_opencl_copy;
-	/* indicate if asynchronous copies to MIC devices should be disabled */
 	int disable_asynchronous_mic_copy;
 
 	unsigned *cuda_opengl_interoperability;
@@ -135,10 +130,6 @@ int starpu_conf_init(struct starpu_conf *conf);
 
 int starpu_init(struct starpu_conf *conf) STARPU_WARN_UNUSED_RESULT;
 
-/* Alternative initialization method with argc and argv. This is use by
- * MIC, MPI, and SCC implementation.
- * Don't call starpu_init and starpu_initialize in the same program.
- */
 int starpu_initialize(struct starpu_conf *user_conf, int *argc, char ***argv);
 
 void starpu_shutdown(void);

+ 0 - 15
include/starpu_bound.h

@@ -14,11 +14,6 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
-/*
- * Compute theoretical upper computation efficiency bound corresponding to
- * some actual execution.
- */
-
 #ifndef __STARPU_BOUND_H__
 #define __STARPU_BOUND_H__
 
@@ -29,25 +24,15 @@ extern "C"
 {
 #endif
 
-/* Start recording tasks (resets stats).  `deps' tells whether dependencies
- * should be recorded too (this is quite expensive).  */
 void starpu_bound_start(int deps, int prio);
-/* Stop recording tasks */
 void starpu_bound_stop(void);
 
-/* Print the DAG that was recorded */
 void starpu_bound_print_dot(FILE *output);
 
-/* Get theoretical upper bound (in ms) (needs glpk support) */
 void starpu_bound_compute(double *res, double *integer_res, int integer);
 
-/* Emit Linear Programming system on output for the recorded tasks in lp format */
 void starpu_bound_print_lp(FILE *output);
-
-/* Emit Linear Programming system on output for the recorded tasks in mps format */
 void starpu_bound_print_mps(FILE *output);
-
-/* Emit statistics of actual execution vs theoretical upper bound */
 void starpu_bound_print(FILE *output, int integer);
 
 #ifdef __cplusplus

+ 2 - 2
include/starpu_cublas.h

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010-2012  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  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
@@ -22,7 +22,7 @@
 extern "C"
 {
 #endif
-/* Some helper functions for application using CUBLAS kernels */
+
 void starpu_cublas_init(void);
 void starpu_cublas_shutdown(void);
 

+ 12 - 33
include/starpu_data_interfaces.h

@@ -50,10 +50,8 @@ struct starpu_data_copy_methods
 	int (*opencl_to_cuda)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node);
 	int (*opencl_to_opencl)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node);
 
-	/* src type is mic */
 	int (*mic_to_ram)(void *src_interface, unsigned srd_node, void *dst_interface, unsigned dst_node);
 
-	/* scc case */
 	int (*scc_src_to_sink)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node);
 	int (*scc_sink_to_src)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node);
 	int (*scc_sink_to_sink)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node);
@@ -75,7 +73,6 @@ struct starpu_data_copy_methods
 #endif
 
 #ifdef STARPU_USE_MIC
-	/* Asynchronous MIC transfers */
 	int (*ram_to_mic_async)(void *src_intreface, unsigned src_node, void *dst_interface, unsigned dst_node);
 	int (*mic_to_ram_async)(void *src_interface, unsigned srd_node, void *dst_interface, unsigned dst_node);
 #endif
@@ -136,7 +133,6 @@ void *starpu_data_get_interface_on_node(starpu_data_handle_t handle, unsigned me
 
 extern struct starpu_data_interface_ops starpu_interface_matrix_ops;
 
-/* Matrix interface for dense matrices */
 struct starpu_matrix_interface
 {
 	enum starpu_data_interface_id id;
@@ -165,9 +161,6 @@ size_t starpu_matrix_get_elemsize(starpu_data_handle_t handle);
 #define STARPU_MATRIX_GET_LD(interface)	(((struct starpu_matrix_interface *)(interface))->ld)
 #define STARPU_MATRIX_GET_ELEMSIZE(interface)	(((struct starpu_matrix_interface *)(interface))->elemsize)
 
-/*
- * COO matrices.
- */
 struct starpu_coo_interface
 {
 	enum starpu_data_interface_id id;
@@ -205,7 +198,6 @@ void starpu_coo_data_register(starpu_data_handle_t *handleptr, unsigned home_nod
 #define STARPU_COO_GET_ELEMSIZE(interface) \
 	(((struct starpu_coo_interface *)(interface))->elemsize)
 
-/* BLOCK interface for 3D dense blocks */
 /* TODO: rename to 3dmatrix? */
 struct starpu_block_interface
 {
@@ -217,8 +209,8 @@ struct starpu_block_interface
 	uint32_t nx;
 	uint32_t ny;
 	uint32_t nz;
-	uint32_t ldy;	/* number of elements between two lines */
-	uint32_t ldz;	/* number of elements between two planes */
+	uint32_t ldy;
+	uint32_t ldz;
 	size_t elemsize;
 };
 
@@ -263,7 +255,6 @@ uintptr_t starpu_vector_get_local_ptr(starpu_data_handle_t handle);
 #define STARPU_VECTOR_GET_NX(interface)	(((struct starpu_vector_interface *)(interface))->nx)
 #define STARPU_VECTOR_GET_ELEMSIZE(interface)	(((struct starpu_vector_interface *)(interface))->elemsize)
 
-/* variable interface for a single data (not a vector, a matrix, a list, ...) */
 struct starpu_variable_interface
 {
 	enum starpu_data_interface_id id;
@@ -286,19 +277,16 @@ uintptr_t starpu_variable_get_local_ptr(starpu_data_handle_t handle);
 
 void starpu_void_data_register(starpu_data_handle_t *handle);
 
-/* CSR interface for sparse matrices (compressed sparse row representation) */
 struct starpu_csr_interface
 {
 	enum starpu_data_interface_id id;
 
-	uint32_t nnz; /* number of non-zero entries */
-	uint32_t nrow; /* number of rows */
-	uintptr_t nzval; /* non-zero values */
-	uint32_t *colind; /* position of non-zero entries on the row */
-	uint32_t *rowptr; /* index (in nzval) of the first entry of the row */
+	uint32_t nnz;
+	uint32_t nrow;
+	uintptr_t nzval;
+	uint32_t *colind;
+	uint32_t *rowptr;
 
-	/* k for k-based indexing (0 or 1 usually) */
-	/* also useful when partitionning the matrix ... */
 	uint32_t firstentry;
 
 	size_t elemsize;
@@ -328,25 +316,19 @@ size_t starpu_csr_get_elemsize(starpu_data_handle_t handle);
 #define STARPU_CSR_GET_FIRSTENTRY(interface)	(((struct starpu_csr_interface *)(interface))->firstentry)
 #define STARPU_CSR_GET_ELEMSIZE(interface)	(((struct starpu_csr_interface *)(interface))->elemsize)
 
-/* BCSR interface for sparse matrices (blocked compressed sparse row
- * representation) */
 struct starpu_bcsr_interface
 {
 	enum starpu_data_interface_id id;
 
-	uint32_t nnz; /* number of non-zero BLOCKS */
-	uint32_t nrow; /* number of rows (in terms of BLOCKS) */
+	uint32_t nnz;
+	uint32_t nrow;
 
-	uintptr_t nzval; /* non-zero values */
-	uint32_t *colind; /* position of non-zero entried on the row */
-/*	uint32_t *rowind; */ /* position of non-zero entried on the col */
-	uint32_t *rowptr; /* index (in nzval) of the first entry of the row */
+	uintptr_t nzval;
+	uint32_t *colind;
+	uint32_t *rowptr;
 
-	/* k for k-based indexing (0 or 1 usually) */
-	/* also useful when partitionning the matrix ... */
 	uint32_t firstentry;
 
-	/* size of the blocks */
 	uint32_t r;
 	uint32_t c;
 
@@ -376,9 +358,6 @@ uint32_t starpu_bcsr_get_r(starpu_data_handle_t handle);
 uint32_t starpu_bcsr_get_c(starpu_data_handle_t handle);
 size_t starpu_bcsr_get_elemsize(starpu_data_handle_t handle);
 
-/*
- * Multiformat interface
- */
 struct starpu_multiformat_data_interface_ops
 {
 	size_t cpu_elemsize;

+ 1 - 63
include/starpu_sched_ctx.h

@@ -26,10 +26,7 @@ extern "C"
 
 unsigned starpu_sched_ctx_create(const char *policy_name, int *workerids_ctx, int nworkers_ctx, const char *sched_ctx_name);
 
-/* create a context indicating an approximate interval of resources */
-unsigned starpu_sched_ctx_create_inside_interval(const char *policy_name, const char *sched_name,
-						 int min_ncpus, int max_ncpus, int min_ngpus, int max_ngpus,
-						 unsigned allow_overlap);
+unsigned starpu_sched_ctx_create_inside_interval(const char *policy_name, const char *sched_name, int min_ncpus, int max_ncpus, int min_ngpus, int max_ngpus, unsigned allow_overlap);
 
 void starpu_sched_ctx_add_workers(int *workerids_ctx, int nworkers_ctx, unsigned sched_ctx_id);
 
@@ -37,140 +34,81 @@ void starpu_sched_ctx_remove_workers(int *workerids_ctx, int nworkers_ctx, unsig
 
 void starpu_sched_ctx_delete(unsigned sched_ctx_id);
 
-/* indicate which context whill inherit the resources of this context when he will be deleted */
 void starpu_sched_ctx_set_inheritor(unsigned sched_ctx_id, unsigned inheritor);
 
-/* indicate that the current thread is submitting only to the current context */
 void starpu_sched_ctx_set_context(unsigned *sched_ctx_id);
 
-/* find out to which context is submitting the current thread */
 unsigned starpu_sched_ctx_get_context(void);
 
-/* stop submitting tasks from the empty context list until the next time the context has
-   time to check the empty context list*/
 void starpu_sched_ctx_stop_task_submission(void);
 
-/* indicate starpu that hte application finished submitting to this context in order to
-   move the workers to the inheritor as soon as possible */
 void starpu_sched_ctx_finished_submit(unsigned sched_ctx_id);
 
 
-/*
- * CONNECTION WITH THE HYPERVISOR
- */
-
-/* performance counters used by the starpu to indicate the hypervisor 
-   how the application and the resources are executing */
 struct starpu_sched_ctx_performance_counters
 {
-	/* tell the hypervisor for how long a worker was idle in a certain context */ 
 	void (*notify_idle_cycle)(unsigned sched_ctx_id, int worker, double idle_time);
-	/* tell the hypervisor when a worker stoped being idle in a certain context */ 
 	void (*notify_idle_end)(unsigned sched_ctx_id, int worker);
-	/* tell the hypervisor when a task was pushed on a worker in a certain context */ 
 	void (*notify_pushed_task)(unsigned sched_ctx_id, int worker);
-	/* tell the hypervisor when a task was poped from a worker in a certain context */ 
 	void (*notify_poped_task)(unsigned sched_ctx_id, int worker, struct starpu_task *task, size_t data_size, uint32_t footprint);
-	/* tell the hypervisor when a task finished executing in a certain context */
 	void (*notify_post_exec_hook)(unsigned sched_ctx_id, int taskid);
-	/* tell the hypervisor when a task was submitted to a certain context */
 	void (*notify_submitted_job)(struct starpu_task *task, uint32_t footprint);
-	/* tell the hypervisor when a context was deleted */
 	void (*notify_delete_context)(unsigned sched_ctx);
 };
 
 #ifdef STARPU_USE_SC_HYPERVISOR
-/* indicates to starpu the pointer to the performance counte */
 void starpu_sched_ctx_set_perf_counters(unsigned sched_ctx_id, struct starpu_sched_ctx_performance_counters *perf_counters);
-/* callback that lets the scheduling policy tell the hypervisor that a task was pushed on a worker */
 void starpu_sched_ctx_call_pushed_task_cb(int workerid, unsigned sched_ctx_id);
 #endif //STARPU_USE_SC_HYPERVISOR
 
-/* allow the hypervisor to let starpu know he's initialised */
 void starpu_sched_ctx_notify_hypervisor_exists(void);
 
-/* ask starpu if he is informed if the hypervisor is initialised */
 unsigned starpu_sched_ctx_check_if_hypervisor_exists(void);
 
-/*
- * POLICY DATA 
-*/
-/* allow the scheduling policy to have its own data in a context, like a private list of tasks, mutexes, conds, etc. */
 void starpu_sched_ctx_set_policy_data(unsigned sched_ctx_id, void *policy_data);
 
-/* return the scheduling policy private data */
 void* starpu_sched_ctx_get_policy_data(unsigned sched_ctx_id);
 
 
-/*
- * WORKERS IN CONTEXT 
-*/
-/* create a worker collection for a context, the type can be only STARPU_WORKER_LIST for now, which corresponds to a simple list */
 struct starpu_worker_collection* starpu_sched_ctx_create_worker_collection(unsigned sched_ctx_id, enum starpu_worker_collection_type type);
 
-/* free the worker collection when removing the context */
 void starpu_sched_ctx_delete_worker_collection(unsigned sched_ctx_id);
 
-/*return the worker collection */
 struct starpu_worker_collection* starpu_sched_ctx_get_worker_collection(unsigned sched_ctx_id);
 
-/* return the number of workers in the sched_ctx's collection */
 unsigned starpu_sched_ctx_get_nworkers(unsigned sched_ctx_id);
 
-/* return the number of shared workers in the sched_ctx's collection */
 unsigned starpu_sched_ctx_get_nshared_workers(unsigned sched_ctx_id, unsigned sched_ctx_id2);
 
-/* return 1 if the worker belongs to the context and 0 otherwise */
 unsigned starpu_sched_ctx_contains_worker(int workerid, unsigned sched_ctx_id);
 
-/* check if a worker is shared between several contexts */
 unsigned starpu_sched_ctx_overlapping_ctxs_on_worker(int workerid);
 
-/* manage sharing of resources between contexts: checkOB which ctx has its turn to pop */
 unsigned starpu_sched_ctx_is_ctxs_turn(int workerid, unsigned sched_ctx_id);
 
-/* manage sharing of resources between contexts: by default a round_robin strategy
-   is executed but the user can interfere to tell which ctx has its turn to pop */
 void starpu_sched_ctx_set_turn_to_other_ctx(int workerid, unsigned sched_ctx_id);
 
-/* time sharing a resources, indicate how long a worker has been active in
-   the current sched_ctx */
 double starpu_sched_ctx_get_max_time_worker_on_ctx(void);
 
-/*
- *	Priorities
- */
-
-/* get min priority for the scheduler of the global context */
 int starpu_sched_get_min_priority(void);
 
-/* get max priority for the scheduler of the global context */
 int starpu_sched_get_max_priority(void);
 
-/* set min priority for the scheduler of the global context */
 int starpu_sched_set_min_priority(int min_prio);
 
-/* set max priority for the scheduler of the global context */
 int starpu_sched_set_max_priority(int max_prio);
 
-/* get min priority for the scheduler of the scheduling context indicated */
 int starpu_sched_ctx_get_min_priority(unsigned sched_ctx_id);
 
-/* get max priority for the scheduler of the scheduling context indicated */
 int starpu_sched_ctx_get_max_priority(unsigned sched_ctx_id);
 
-/* set min priority for the scheduler of the scheduling context indicated */
 int starpu_sched_ctx_set_min_priority(unsigned sched_ctx_id, int min_prio);
 
-/* set max priority for the scheduler of the scheduling context indicated */
 int starpu_sched_ctx_set_max_priority(unsigned sched_ctx_id, int max_prio);
 
-/* Provided for legacy reasons */
 #define STARPU_MIN_PRIO		(starpu_sched_get_min_priority())
 #define STARPU_MAX_PRIO		(starpu_sched_get_max_priority())
 
-/* By convention, the default priority level should be 0 so that we can
- * statically allocate tasks with a default priority. */
 #define STARPU_DEFAULT_PRIO	0
 
 /* execute any parallel code on the workers of the sched_ctx (workers are blocked) */

+ 0 - 13
include/starpu_scheduler.h

@@ -49,25 +49,12 @@ struct starpu_sched_policy
 
 struct starpu_sched_policy **starpu_sched_get_predefined_policies();
 
-/* 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
-associated mutex) should be used to block (and to wake up) a worker. Note that
-multiple workers may use the same condition variable. For instance, in the case
-of a scheduling strategy with a single task queue, the same condition variable
-would be used to block and wake up all workers.   */
 void starpu_worker_get_sched_condition(int workerid, starpu_pthread_mutex_t **sched_mutex, starpu_pthread_cond_t **sched_cond);
 
-/* Check if the worker specified by workerid can execute the codelet. */
 int starpu_worker_can_execute_task(unsigned workerid, struct starpu_task *task, unsigned nimpl);
 
-/* 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
- * is sufficient. If "back" not null, the task is put at the back of the queue
- * where the worker will pop tasks first. Setting "back" to 0 therefore ensures
- * a FIFO ordering. */
 int starpu_push_local_task(int workerid, struct starpu_task *task, int back);
 
-/* Called by scheduler to notify that the task has just been pushed */
 int starpu_push_task_end(struct starpu_task *task);
 
 /*

+ 2 - 5
include/starpu_task_util.h

@@ -29,17 +29,14 @@ extern "C"
 {
 #endif
 
-/* This creates (and submits) an empty task that unlocks a tag once all its
- * dependencies are fulfilled. */
-void starpu_create_sync_task(starpu_tag_t sync_tag, unsigned ndeps, starpu_tag_t *deps,
-				void (*callback)(void *), void *callback_arg);
+void starpu_create_sync_task(starpu_tag_t sync_tag, unsigned ndeps, starpu_tag_t *deps,	void (*callback)(void *), void *callback_arg);
 
 #define STARPU_VALUE		 (1<<19)
 #define STARPU_CALLBACK		 (1<<20)
 #define STARPU_CALLBACK_WITH_ARG (1<<21)
 #define STARPU_CALLBACK_ARG	 (1<<22)
 #define STARPU_PRIORITY		 (1<<23)
-#define STARPU_EXECUTE_ON_NODE	 (1<<24)	/* Used by MPI to define which task is going to execute the codelet */
+#define STARPU_EXECUTE_ON_NODE	 (1<<24)
 #define STARPU_EXECUTE_ON_DATA	 (1<<25)
 #define STARPU_DATA_ARRAY        (1<<26)
 #define STARPU_TAG               (1<<27)