瀏覽代碼

Fix doxygen links

Samuel Thibault 4 年之前
父節點
當前提交
42dad5e48d

+ 7 - 7
doc/doxygen_dev/chapters/010_core.doxy

@@ -211,7 +211,7 @@ the application code on a thread launched by the application, or automatically
 by StarPU on a device-dependent CPU thread launched by StarPU. Whether a
 worker's operation cycle is managed automatically or
 not is controlled per session by the field \c not_launched_drivers of the \c
-starpu_conf struct, and is decided in \ref _starpu_launch_drivers() function.
+starpu_conf struct, and is decided in \c _starpu_launch_drivers function.
 
 When managed automatically, cycles of operations for a worker are handled by the corresponding
 driver specific <code>_starpu_<DRV>_worker()</code> function, where \c DRV is a driver name such as
@@ -220,7 +220,7 @@ Otherwise, the application must supply a thread which will repeatedly call \ref
 starpu_driver_run_once() for the corresponding worker.
 
 In both cases, control is then transferred to 
-\ref _starpu_cpu_driver_run_once() (or the corresponding driver specific func).
+\c _starpu_cpu_driver_run_once (or the corresponding driver specific func).
 The cycle of operations typically includes, at least, the following operations:
 
 - <b>task scheduling</b>
@@ -270,7 +270,7 @@ driving) progress, with a call to \ref __starpu_datawizard_progress(),
 
 Once the worker has a pending task assigned and the input data for that task are
 available in the memory node reachable by the worker's computing unit, the
-worker calls \ref _starpu_cpu_driver_execute_task() (or the corresponding driver
+worker calls \c _starpu_cpu_driver_execute_task (or the corresponding driver
 specific function) to proceed to the execution of the task.
 
 
@@ -312,12 +312,12 @@ writing.
 When the set of workers assigned to a scheduling context is about to be
 modified, all the workers in the union between the workers belonging to the
 scheduling context before the change and the workers expected to belong to the
-scheduling context after the change must be notified using the \ref
-notify_workers_about_changing_ctx_pending() function prior to the update. After
+scheduling context after the change must be notified using the
+\c notify_workers_about_changing_ctx_pending function prior to the update. After
 the update, all the workers in that same union must be notified for the update
-completion with a call to \ref notify_workers_about_changing_ctx_done().
+completion with a call to \c notify_workers_about_changing_ctx_done.
 
-The function \ref notify_workers_about_changing_ctx_pending() places every
+The function \c notify_workers_about_changing_ctx_pending places every
 worker passed in argument in a state compatible with changing the scheduling
 context assignment of that worker, possibly blocking until that worker leaves
 incompatible states such as a pending scheduling operation. If the caller of

+ 3 - 0
doc/doxygen_dev/doxygen-config.cfg.in

@@ -16,6 +16,9 @@
 #
 INPUT                  = @top_srcdir@/doc/doxygen_dev/chapters         \
                          @top_builddir@/doc/doxygen_dev/config.h \
+			 @top_srcdir@/include/starpu_driver.h \
+			 @top_srcdir@/include/starpu_worker.h \
+			 @top_srcdir@/include/starpu_config.h \
 			 @top_srcdir@/src/datawizard/data_request.h \
 			 @top_srcdir@/src/datawizard/coherency.h \
 			 @top_srcdir@/src/datawizard/sort_data_handles.h \

+ 3 - 0
include/starpu_worker.h

@@ -302,6 +302,9 @@ struct starpu_tree* starpu_workers_get_tree(void);
 
 unsigned starpu_worker_get_sched_ctx_list(int worker, unsigned **sched_ctx);
 
+/**
+   Return whether worker \p workerid is currently blocked in a parallel task.
+ */
 unsigned starpu_worker_is_blocked_in_parallel(int workerid);
 
 unsigned starpu_worker_is_slave_somewhere(int workerid);

+ 17 - 28
src/core/workers.h

@@ -803,6 +803,10 @@ static inline void _starpu_worker_process_block_in_parallel_requests(struct _sta
 	}
 }
 
+#ifdef STARPU_SPINLOCK_CHECK
+#define _starpu_worker_enter_sched_op(worker) __starpu_worker_enter_sched_op((worker), __FILE__, __LINE__, __starpu_func__)
+static inline void __starpu_worker_enter_sched_op(struct _starpu_worker * const worker, const char*file, int line, const char* func)
+#else
 /** Mark the beginning of a scheduling operation by the worker. No worker
  * blocking operations on parallel tasks and no scheduling context change
  * operations must be performed on contexts containing the worker, on
@@ -819,9 +823,6 @@ static inline void _starpu_worker_process_block_in_parallel_requests(struct _sta
  *
  * Must be called with worker's sched_mutex held.
  */
-#ifdef STARPU_SPINLOCK_CHECK
-static inline void __starpu_worker_enter_sched_op(struct _starpu_worker * const worker, const char*file, int line, const char* func)
-#else
 static inline void _starpu_worker_enter_sched_op(struct _starpu_worker * const worker)
 #endif
 {
@@ -864,18 +865,17 @@ static inline void _starpu_worker_enter_sched_op(struct _starpu_worker * const w
 	worker->relax_on_func = func;
 #endif
 }
-#ifdef STARPU_SPINLOCK_CHECK
-#define _starpu_worker_enter_sched_op(worker) __starpu_worker_enter_sched_op((worker), __FILE__, __LINE__, __starpu_func__)
-#endif
 
-/** Mark the end of a scheduling operation by the worker.
- *
- * Must be called with worker's sched_mutex held.
- */
 void _starpu_worker_apply_deferred_ctx_changes(void);
+
 #ifdef STARPU_SPINLOCK_CHECK
+#define _starpu_worker_leave_sched_op(worker) __starpu_worker_leave_sched_op((worker), __FILE__, __LINE__, __starpu_func__)
 static inline void __starpu_worker_leave_sched_op(struct _starpu_worker * const worker, const char*file, int line, const char* func)
 #else
+/** Mark the end of a scheduling operation by the worker.
+ *
+ * Must be called with worker's sched_mutex held.
+ */
 static inline void _starpu_worker_leave_sched_op(struct _starpu_worker * const worker)
 #endif
 {
@@ -890,9 +890,6 @@ static inline void _starpu_worker_leave_sched_op(struct _starpu_worker * const w
 	STARPU_PTHREAD_COND_BROADCAST(&worker->sched_cond);
 	_starpu_worker_apply_deferred_ctx_changes();
 }
-#ifdef STARPU_SPINLOCK_CHECK
-#define _starpu_worker_leave_sched_op(worker) __starpu_worker_leave_sched_op((worker), __FILE__, __LINE__, __starpu_func__)
-#endif
 
 static inline int _starpu_worker_sched_op_pending(void)
 {
@@ -962,11 +959,12 @@ static inline void _starpu_worker_leave_changing_ctx_op(struct _starpu_worker *
 	STARPU_PTHREAD_COND_BROADCAST(&worker->sched_cond);
 }
 
-/** Temporarily allow other worker to access current worker state, when still scheduling,
- * but the scheduling has not yet been made or is already done */
 #ifdef STARPU_SPINLOCK_CHECK
+#define _starpu_worker_relax_on() __starpu_worker_relax_on(__FILE__, __LINE__, __starpu_func__)
 static inline void __starpu_worker_relax_on(const char*file, int line, const char* func)
 #else
+/** Temporarily allow other worker to access current worker state, when still scheduling,
+ * but the scheduling has not yet been made or is already done */
 static inline void _starpu_worker_relax_on(void)
 #endif
 {
@@ -990,15 +988,13 @@ static inline void _starpu_worker_relax_on(void)
 	STARPU_PTHREAD_COND_BROADCAST(&worker->sched_cond);
 	STARPU_PTHREAD_MUTEX_UNLOCK_SCHED(&worker->sched_mutex);
 }
-#ifdef STARPU_SPINLOCK_CHECK
-#define _starpu_worker_relax_on() __starpu_worker_relax_on(__FILE__, __LINE__, __starpu_func__)
-#endif
 #define starpu_worker_relax_on _starpu_worker_relax_on
 
-/** Same, but with current worker mutex already held */
 #ifdef STARPU_SPINLOCK_CHECK
+#define _starpu_worker_relax_on_locked(worker) __starpu_worker_relax_on_locked(worker,__FILE__, __LINE__, __starpu_func__)
 static inline void __starpu_worker_relax_on_locked(struct _starpu_worker *worker, const char*file, int line, const char* func)
 #else
+/** Same, but with current worker mutex already held */
 static inline void _starpu_worker_relax_on_locked(struct _starpu_worker *worker)
 #endif
 {
@@ -1017,11 +1013,9 @@ static inline void _starpu_worker_relax_on_locked(struct _starpu_worker *worker)
 #endif
 	STARPU_PTHREAD_COND_BROADCAST(&worker->sched_cond);
 }
-#ifdef STARPU_SPINLOCK_CHECK
-#define _starpu_worker_relax_on_locked(worker) __starpu_worker_relax_on_locked(worker,__FILE__, __LINE__, __starpu_func__)
-#endif
 
 #ifdef STARPU_SPINLOCK_CHECK
+#define _starpu_worker_relax_off() __starpu_worker_relax_off(__FILE__, __LINE__, __starpu_func__)
 static inline void __starpu_worker_relax_off(const char*file, int line, const char* func)
 #else
 static inline void _starpu_worker_relax_off(void)
@@ -1048,12 +1042,10 @@ static inline void _starpu_worker_relax_off(void)
 #endif
 	STARPU_PTHREAD_MUTEX_UNLOCK_SCHED(&worker->sched_mutex);
 }
-#ifdef STARPU_SPINLOCK_CHECK
-#define _starpu_worker_relax_off() __starpu_worker_relax_off(__FILE__, __LINE__, __starpu_func__)
-#endif
 #define starpu_worker_relax_off _starpu_worker_relax_off
 
 #ifdef STARPU_SPINLOCK_CHECK
+#define _starpu_worker_relax_off_locked() __starpu_worker_relax_off_locked(__FILE__, __LINE__, __starpu_func__)
 static inline void __starpu_worker_relax_off_locked(const char*file, int line, const char* func)
 #else
 static inline void _starpu_worker_relax_off_locked(void)
@@ -1078,9 +1070,6 @@ static inline void _starpu_worker_relax_off_locked(void)
 	worker->relax_off_func = func;
 #endif
 }
-#ifdef STARPU_SPINLOCK_CHECK
-#define _starpu_worker_relax_off_locked() __starpu_worker_relax_off_locked(__FILE__, __LINE__, __starpu_func__)
-#endif
 
 static inline int _starpu_worker_get_relax_state(void)
 {

+ 3 - 0
src/datawizard/coherency.h

@@ -341,6 +341,9 @@ void _starpu_release_nowhere_task_output(struct _starpu_job *j);
 
 struct _starpu_worker;
 STARPU_ATTRIBUTE_WARN_UNUSED_RESULT
+/** Fetch the data parameters for task \p task
+ * Setting \p async to 1 allows to only start the fetches, and call
+ * \p _starpu_fetch_task_input_tail later when the transfers are finished */
 int _starpu_fetch_task_input(struct starpu_task *task, struct _starpu_job *j, int async);
 void _starpu_fetch_task_input_tail(struct starpu_task *task, struct _starpu_job *j, struct _starpu_worker *worker);
 void _starpu_fetch_nowhere_task_input(struct _starpu_job *j);

+ 10 - 0
src/datawizard/datawizard.h

@@ -34,8 +34,18 @@
 
 #include <core/dependencies/implicit_data_deps.h>
 
+/** Make data transfers progress on node \p memory_node.
+ *
+ * If \p push_requests is 1, it can start new transfers
+ *
+ * If \p may_alloc is 1, it can allocate destination data for transfers
+ * (this is not possible e.g. when spinning for a handle lock)
+ */
 int ___starpu_datawizard_progress(unsigned memory_node, unsigned may_alloc, unsigned push_requests);
+/** Call ___starpu_datawizard_progress() for all memory nodes driven by the
+ * current worker */
 int __starpu_datawizard_progress(unsigned may_alloc, unsigned push_requests);
+/** Call __starpu_datawizard_progress with push_requests = 1 */
 void _starpu_datawizard_progress(unsigned may_alloc);
 
 #endif // __DATAWIZARD_H__

+ 2 - 0
src/drivers/driver_common/driver_common.h

@@ -32,6 +32,8 @@ void _starpu_driver_end_job(struct _starpu_worker *args, struct _starpu_job *j,
 void _starpu_driver_update_job_feedback(struct _starpu_job *j, struct _starpu_worker *worker_args,
 					struct starpu_perfmodel_arch* perf_arch, int profiling);
 
+/** Get from the scheduler a task to be executed on the worker \p workerid */
 struct starpu_task *_starpu_get_worker_task(struct _starpu_worker *args, int workerid, unsigned memnode);
+/** Get from the scheduler tasks to be executed on the workers \p workers */
 int _starpu_get_multi_worker_task(struct _starpu_worker *workers, struct starpu_task ** tasks, int nworker, unsigned memnode);
 #endif // __DRIVER_COMMON_H__