Bladeren bron

- setup doxygen to build StarPU_OpenMP documentation (on-going work)

Olivier Aumage 11 jaren geleden
bovenliggende
commit
5f4a7a49cf

+ 2 - 0
doc/doxygen/Makefile.am

@@ -86,6 +86,7 @@ chapters =	\
 	chapters/api/mpi.doxy \
 	chapters/api/multiformat_data_interface.doxy \
 	chapters/api/opencl_extensions.doxy \
+	chapters/api/openmp_runtime_support.doxy \
 	chapters/api/mic_extensions.doxy \
 	chapters/api/scc_extensions.doxy \
 	chapters/api/parallel_tasks.doxy \
@@ -202,6 +203,7 @@ dox_inputs = $(DOX_CONFIG) 				\
 	$(top_srcdir)/include/starpu_fxt.h		\
 	$(top_srcdir)/include/starpu_cuda.h		\
 	$(top_srcdir)/include/starpu_opencl.h		\
+	$(top_srcdir)/include/starpu_openmp.h		\
 	$(top_srcdir)/include/starpu_sink.h		\
 	$(top_srcdir)/include/starpu_mic.h		\
 	$(top_srcdir)/include/starpu_scc.h		\

+ 1 - 0
doc/doxygen/chapters/45files.doxy

@@ -26,6 +26,7 @@
 \file starpu_hash.h
 \file starpu_mic.h
 \file starpu_opencl.h
+\file starpu_openmp.h
 \file starpu_perfmodel.h
 \file starpu_profiling.h
 \file starpu_rand.h

+ 313 - 0
doc/doxygen/chapters/api/openmp_runtime_support.doxy

@@ -0,0 +1,313 @@
+/*
+ * This file is part of the StarPU Handbook.
+ * Copyright (C) 2014 Inria
+ * See the file version.doxy for copying conditions.
+ */
+
+/*! \defgroup API_OpenMP_Runtime_Support OpenMP Runtime Support
+
+@name Initialisation
+\ingroup API_OpenMP_Runtime_Support
+
+\def STARPU_OPENMP
+\ingroup API_OpenMP_Runtime_Support
+This macro is defined when StarPU has been installed with OpenMP Runtime
+support. It should be used in your code to detect the availability of
+the runtime support for OpenMP.
+
+\fn int starpu_omp_init(void)
+\ingroup API_OpenMP_Runtime_Support
+Initializes StarPU and its OpenMP Runtime support.
+
+\fn int starpu_omp_shutdown(void)
+\ingroup API_OpenMP_Runtime_Support
+Shutdown StarPU and its OpenMP Runtime support.
+
+@name Parallel
+\anchor ORS_Parallel
+\ingroup API_OpenMP_Runtime_Support
+
+\fn void starpu_omp_parallel_region(const struct starpu_omp_parallel_region_attr *attr)
+\ingroup API_OpenMP_Runtime_Support
+Generates and launch an OpenMP parallel region and return after its
+completion. \p attr specifies the attributes for the generated parallel region.
+If this function is called from inside another, generating, parallel region, the
+generated parallel region is nested within the generating parallel region. This
+function can be used to implement <c>pragma omp parallel</c>.
+
+\fn void starpu_omp_master(void (*f)(void *arg), void *arg)
+\ingroup API_OpenMP_Runtime_Support
+Executes a function only on the master thread of the OpenMP
+parallel region it is called from. When called from a thread that is not the
+master of the parallel region it is called from, this function does nothing. \p
+f is the function to be called. \p arg is an argument passed to \p arg. This
+function can be used to implement <c>pragma omp master</c>.
+
+\fn int starpu_omp_master_inline(void)
+\ingroup API_OpenMP_Runtime_Support
+Returns whether the calling thread is the master of the OpenMP parallel region
+it is called from or not. This function can be used to implement <c>pragma omp
+master</c> without code outlining.
+
+@name Synchronization
+\anchor ORS_Synchronization
+\ingroup API_OpenMP_Runtime_Support
+
+\fn void starpu_omp_barrier(void)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn void starpu_omp_critical(void (*f)(void *arg), void *arg, const char *name)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn void starpu_omp_critical_inline_begin(const char *name)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn void starpu_omp_critical_inline_end(const char *name)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+
+@name Worksharing
+\anchor ORS_Worksharing
+\ingroup API_OpenMP_Runtime_Support
+
+\fn void starpu_omp_single(void (*f)(void *arg), void *arg, int nowait)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn int starpu_omp_single_inline(void)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn void starpu_omp_for(void (*f)(unsigned long long _first_i, unsigned long long _nb_i, void *arg), void *arg, unsigned long long nb_iterations, unsigned long long chunk, int schedule, int ordered, int nowait)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn int starpu_omp_for_inline_first(unsigned long long nb_iterations, unsigned long long chunk, int schedule, int ordered, unsigned long long *_first_i, unsigned long long *_nb_i)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn int starpu_omp_for_inline_next(unsigned long long nb_iterations, unsigned long long chunk, int schedule, int ordered, unsigned long long *_first_i, unsigned long long *_nb_i)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn void starpu_omp_for_alt(void (*f)(unsigned long long _begin_i, unsigned long long _end_i, void *arg), void *arg, unsigned long long nb_iterations, unsigned long long chunk, int schedule, int ordered, int nowait)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn int starpu_omp_for_inline_first_alt(unsigned long long nb_iterations, unsigned long long chunk, int schedule, int ordered, unsigned long long *_begin_i, unsigned long long *_end_i)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn int starpu_omp_for_inline_next_alt(unsigned long long nb_iterations, unsigned long long chunk, int schedule, int ordered, unsigned long long *_begin_i, unsigned long long *_end_i)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn void starpu_omp_ordered_inline_begin(void)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn void starpu_omp_ordered_inline_end(void)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn void starpu_omp_ordered(void (*f)(void *arg), void *arg)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn void starpu_omp_sections(unsigned long long nb_sections, void (**section_f)(void *arg), void **section_arg, int nowait)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn void starpu_omp_sections_combined(unsigned long long nb_sections, void (*section_f)(unsigned long long section_num, void *arg), void **section_arg, int nowait)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+
+
+@name Task
+\anchor ORS_Task
+\ingroup API_OpenMP_Runtime_Support
+
+\fn void starpu_omp_task_region(const struct starpu_omp_task_region_attr *attr)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn void starpu_omp_taskwait(void)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn void starpu_omp_taskgroup(void (*f)(void *arg), void *arg)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+
+@name API
+\anchor ORS_API
+\ingroup API_OpenMP_Runtime_Support
+
+\fn void starpu_omp_set_num_threads(int threads)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn int starpu_omp_get_num_threads()
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn int starpu_omp_get_thread_num()
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn int starpu_omp_get_max_threads()
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn int starpu_omp_get_num_procs (void)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn int starpu_omp_in_parallel (void)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn void starpu_omp_set_dynamic (int dynamic_threads)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn int starpu_omp_get_dynamic (void)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn void starpu_omp_set_nested (int nested)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn int starpu_omp_get_nested (void)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn int starpu_omp_get_cancellation(void)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn void starpu_omp_set_schedule (enum starpu_omp_sched_value kind, int modifier)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn void starpu_omp_get_schedule (enum starpu_omp_sched_value *kind, int *modifier)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn int starpu_omp_get_thread_limit (void)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn void starpu_omp_set_max_active_levels (int max_levels)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn int starpu_omp_get_max_active_levels (void)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn int starpu_omp_get_level (void)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn int starpu_omp_get_ancestor_thread_num (int level)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn int starpu_omp_get_team_size (int level)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn int starpu_omp_get_active_level (void)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn int starpu_omp_in_final(void)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn enum starpu_omp_proc_bind_value starpu_omp_get_proc_bind(void)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn void starpu_omp_set_default_device(int device_num)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn int starpu_omp_get_default_device(void)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn int starpu_omp_get_num_devices(void)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn int starpu_omp_get_num_teams(void)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn int starpu_omp_get_team_num(void)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn int starpu_omp_is_initial_device(void)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn void starpu_omp_init_lock (starpu_omp_lock_t *lock)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn void starpu_omp_destroy_lock (starpu_omp_lock_t *lock)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn void starpu_omp_set_lock (starpu_omp_lock_t *lock)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn void starpu_omp_unset_lock (starpu_omp_lock_t *lock)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn int starpu_omp_test_lock (starpu_omp_lock_t *lock)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn void starpu_omp_init_nest_lock (starpu_omp_nest_lock_t *lock)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn void starpu_omp_destroy_nest_lock (starpu_omp_nest_lock_t *lock)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn void starpu_omp_set_nest_lock (starpu_omp_nest_lock_t *lock)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn void starpu_omp_unset_nest_lock (starpu_omp_nest_lock_t *lock)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn int starpu_omp_test_nest_lock (starpu_omp_nest_lock_t *lock)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn double starpu_omp_get_wtime (void)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+\fn double starpu_omp_get_wtick (void)
+\ingroup API_OpenMP_Runtime_Support
+This function .
+
+
+*/

+ 1 - 0
doc/doxygen/doxygen-config.cfg.in

@@ -36,6 +36,7 @@ INPUT                  = @top_srcdir@/doc/doxygen/chapters \
 			 @top_srcdir@/include/starpu_hash.h \
 			 @top_srcdir@/include/starpu_mic.h \
 			 @top_srcdir@/include/starpu_opencl.h \
+			 @top_srcdir@/include/starpu_openmp.h \
 			 @top_srcdir@/include/starpu_perfmodel.h \
 			 @top_srcdir@/include/starpu_profiling.h \
 			 @top_srcdir@/include/starpu_rand.h \

+ 1 - 0
doc/doxygen/doxygen.cfg

@@ -1623,6 +1623,7 @@ PREDEFINED             = STARPU_USE_OPENCL=1 \
 			 STARPU_HAVE_HWLOC=1 \
 			 STARPU_USE_SC_HYPERVISOR=1 \
 			 STARPU_SIMGRID=1 \
+			 STARPU_OPENMP=1 \
                          __GCC__
 
 # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then

+ 2 - 0
doc/doxygen/refman.tex

@@ -242,6 +242,7 @@ Documentation License”.
 \input{group__API__Theoretical__Lower__Bound__on__Execution__Time}
 \input{group__API__CUDA__Extensions}
 \input{group__API__OpenCL__Extensions}
+\input{group__API__OpenMP__Runtime__Support}
 \input{group__API__MIC__Extensions}
 \input{group__API__SCC__Extensions}
 \input{group__API__Miscellaneous__Helpers}
@@ -284,6 +285,7 @@ Documentation License”.
 \input{starpu__hash_8h}
 \input{starpu__mic_8h}
 \input{starpu__opencl_8h}
+\input{starpu__openmp_8h}
 \input{starpu__perfmodel_8h}
 \input{starpu__profiling_8h}
 \input{starpu__rand_8h}