Browse Source

Fix missing inlines and inline detection

Samuel Thibault 5 years ago
parent
commit
271c5470fa
35 changed files with 72 additions and 1 deletions
  1. 1 1
      src/Makefile.am
  2. 2 0
      src/core/jobs.c
  3. 1 0
      src/core/perfmodel/perfmodel_bus.c
  4. 1 0
      src/core/perfmodel/perfmodel_print.c
  5. 1 0
      src/core/sched_ctx.c
  6. 1 0
      src/core/sched_policy.c
  7. 1 0
      src/core/task.c
  8. 6 0
      src/core/workers.c
  9. 6 0
      src/core/workers.h
  10. 1 0
      src/datawizard/filters.c
  11. 3 0
      src/datawizard/interfaces/bcsr_interface.c
  12. 3 0
      src/datawizard/interfaces/block_interface.c
  13. 3 0
      src/datawizard/interfaces/coo_interface.c
  14. 3 0
      src/datawizard/interfaces/csr_interface.c
  15. 3 0
      src/datawizard/interfaces/matrix_interface.c
  16. 3 0
      src/datawizard/interfaces/multiformat_interface.c
  17. 3 0
      src/datawizard/interfaces/tensor_interface.c
  18. 3 0
      src/datawizard/interfaces/variable_interface.c
  19. 3 0
      src/datawizard/interfaces/vector_interface.c
  20. 3 0
      src/datawizard/interfaces/void_interface.c
  21. 1 0
      src/datawizard/memory_manager.c
  22. 1 0
      src/datawizard/reduction.c
  23. 1 0
      src/datawizard/user_interactions.c
  24. 1 0
      src/datawizard/write_back.c
  25. 1 0
      src/drivers/disk/driver_disk.c
  26. 1 0
      src/drivers/driver_common/driver_common.c
  27. 1 0
      src/profiling/bound.c
  28. 2 0
      src/sched_policies/component_best_implementation.c
  29. 3 0
      src/sched_policies/component_eager.c
  30. 1 0
      src/sched_policies/component_sched.c
  31. 3 0
      src/sched_policies/deque_modeling_policy_data_aware.c
  32. 2 0
      src/sched_policies/modular_ez.c
  33. 1 0
      src/util/execute_on_all.c
  34. 1 0
      src/util/openmp_runtime_support.c
  35. 1 0
      src/util/starpu_data_cpy.c

+ 1 - 1
src/Makefile.am

@@ -407,7 +407,7 @@ endif
 dist-hook:
 	failed=0 ; \
 	look=""; \
-	for i in $$( $(GREP) "static inline" $$(find $(srcdir) -name \*.h) | $(SED) -e 's/.*static inline //g' | $(GREP) -v ENAME\#\# | $(SED) -e 's/[^(]* \(\|\*\)\([^ (]*\)(.*/\2/' | $(GREP) -v _starpu_spin_init) ; do \
+	for i in $$( $(GREP) "static inline" $$(find $(srcdir) -name \*.h) | $(SED) -e 's/.*static inline //g' | $(GREP) -v ENAME\#\# | $(SED) -n -e 's/[^(]* \(\|\*\)\([^ (]*\)(.*/\2/' -e 'p;s/^_*//;p' | $(GREP) -v _starpu_spin_init | $(GREP) -v starpu_sched_ctx_worker_is_master_for_child_ctx) ; do \
 		if [ -z "$$look" ] ; then \
 			look="$$i" ; \
 		else \

+ 2 - 0
src/core/jobs.c

@@ -24,10 +24,12 @@
 #include <common/config.h>
 #include <common/utils.h>
 #include <common/graph.h>
+#include <datawizard/memory_nodes.h>
 #include <profiling/profiling.h>
 #include <profiling/bound.h>
 #include <core/debug.h>
 #include <limits.h>
+#include <core/workers.h>
 
 static int max_memory_use;
 static unsigned long njobs, maxnjobs;

+ 1 - 0
src/core/perfmodel/perfmodel_bus.c

@@ -37,6 +37,7 @@
 #include <core/topology.h>
 #include <common/utils.h>
 #include <drivers/mpi/driver_mpi_common.h>
+#include <datawizard/memory_nodes.h>
 
 #ifdef STARPU_USE_OPENCL
 #include <starpu_opencl.h>

+ 1 - 0
src/core/perfmodel/perfmodel_print.c

@@ -19,6 +19,7 @@
 #include <starpu.h>
 #include <starpu_perfmodel.h>
 #include <common/config.h>
+#include <core/workers.h>
 #include "perfmodel.h"
 
 static

+ 1 - 0
src/core/sched_ctx.c

@@ -21,6 +21,7 @@
 #include <common/utils.h>
 #include <stdarg.h>
 #include <core/task.h>
+#include <core/workers.h>
 
 enum _starpu_ctx_change_op
 {

+ 1 - 0
src/core/sched_policy.c

@@ -22,6 +22,7 @@
 #include <common/utils.h>
 #include <core/sched_policy.h>
 #include <profiling/profiling.h>
+#include <datawizard/memory_nodes.h>
 #include <common/barrier.h>
 #include <core/debug.h>
 #include <core/task.h>

+ 1 - 0
src/core/task.c

@@ -30,6 +30,7 @@
 #include <common/utils.h>
 #include <common/fxt.h>
 #include <common/knobs.h>
+#include <datawizard/memory_nodes.h>
 #include <profiling/profiling.h>
 #include <profiling/bound.h>
 #include <math.h>

+ 6 - 0
src/core/workers.c

@@ -2654,31 +2654,37 @@ int starpu_worker_get_relax_state(void)
 	return _starpu_worker_get_relax_state();
 }
 
+#undef starpu_worker_lock
 void starpu_worker_lock(int workerid)
 {
 	_starpu_worker_lock(workerid);
 }
 
+#undef starpu_worker_trylock
 int starpu_worker_trylock(int workerid)
 {
 	return _starpu_worker_trylock(workerid);
 }
 
+#undef starpu_worker_unlock
 void starpu_worker_unlock(int workerid)
 {
 	_starpu_worker_unlock(workerid);
 }
 
+#undef starpu_worker_lock_self
 void starpu_worker_lock_self(void)
 {
 	_starpu_worker_lock_self();
 }
 
+#undef starpu_worker_unlock_self
 void starpu_worker_unlock_self(void)
 {
 	_starpu_worker_unlock_self();
 }
 
+#undef starpu_wake_worker_relax
 int starpu_wake_worker_relax(int workerid)
 {
 	return _starpu_wake_worker_relax(workerid);

+ 6 - 0
src/core/workers.h

@@ -1117,6 +1117,7 @@ static inline void _starpu_worker_lock(int workerid)
 		STARPU_PTHREAD_MUTEX_LOCK_SCHED(&worker->sched_mutex);
 	}
 }
+#define starpu_worker_lock _starpu_worker_lock
 
 static inline int _starpu_worker_trylock(int workerid)
 {
@@ -1147,6 +1148,7 @@ static inline int _starpu_worker_trylock(int workerid)
 	STARPU_PTHREAD_MUTEX_UNLOCK_SCHED(&cur_worker->sched_mutex);
 	return ret;
 }
+#define starpu_worker_trylock _starpu_worker_trylock
 
 static inline void _starpu_worker_unlock(int workerid)
 {
@@ -1159,6 +1161,7 @@ static inline void _starpu_worker_unlock(int workerid)
 		starpu_worker_relax_off();
 	}
 }
+#define starpu_worker_unlock _starpu_worker_unlock
 
 static inline void _starpu_worker_lock_self(void)
 {
@@ -1167,6 +1170,7 @@ static inline void _starpu_worker_lock_self(void)
 	STARPU_ASSERT(worker != NULL);
 	STARPU_PTHREAD_MUTEX_LOCK_SCHED(&worker->sched_mutex);
 }
+#define starpu_worker_lock_self _starpu_worker_lock_self
 
 static inline void _starpu_worker_unlock_self(void)
 {
@@ -1175,6 +1179,7 @@ static inline void _starpu_worker_unlock_self(void)
 	STARPU_ASSERT(worker != NULL);
 	STARPU_PTHREAD_MUTEX_UNLOCK_SCHED(&worker->sched_mutex);
 }
+#define starpu_worker_unlock_self _starpu_worker_unlock_self
 
 static inline int _starpu_wake_worker_relax(int workerid)
 {
@@ -1183,6 +1188,7 @@ static inline int _starpu_wake_worker_relax(int workerid)
 	_starpu_worker_unlock(workerid);
 	return ret;
 }
+#define starpu_wake_worker_relax _starpu_wake_worker_relax
 
 int starpu_wake_worker_relax_light(int workerid);
 

+ 1 - 0
src/datawizard/filters.c

@@ -21,6 +21,7 @@
 #include <datawizard/filters.h>
 #include <datawizard/footprint.h>
 #include <datawizard/interfaces/data_interface.h>
+#include <datawizard/memory_nodes.h>
 #include <core/task.h>
 
 /*

+ 3 - 0
src/datawizard/interfaces/bcsr_interface.c

@@ -15,6 +15,9 @@
  */
 
 #include <starpu.h>
+#ifdef BUILDING_STARPU
+#include <datawizard/memory_nodes.h>
+#endif
 
 /*
  * BCSR : blocked CSR, we use blocks of size (r x c)

+ 3 - 0
src/datawizard/interfaces/block_interface.c

@@ -15,6 +15,9 @@
  */
 
 #include <starpu.h>
+#ifdef BUILDING_STARPU
+#include <datawizard/memory_nodes.h>
+#endif
 
 static int copy_any_to_any(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, void *async_data);
 

+ 3 - 0
src/datawizard/interfaces/coo_interface.c

@@ -15,6 +15,9 @@
  */
 
 #include <starpu.h>
+#ifdef BUILDING_STARPU
+#include <datawizard/memory_nodes.h>
+#endif
 
 static int
 copy_any_to_any(void *src_interface, unsigned src_node,

+ 3 - 0
src/datawizard/interfaces/csr_interface.c

@@ -16,6 +16,9 @@
  */
 
 #include <starpu.h>
+#ifdef BUILDING_STARPU
+#include <datawizard/memory_nodes.h>
+#endif
 
 static int copy_any_to_any(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, void *async_data);
 

+ 3 - 0
src/datawizard/interfaces/matrix_interface.c

@@ -15,6 +15,9 @@
  */
 
 #include <starpu.h>
+#ifdef BUILDING_STARPU
+#include <datawizard/memory_nodes.h>
+#endif
 
 static int copy_any_to_any(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, void *async_data);
 

+ 3 - 0
src/datawizard/interfaces/multiformat_interface.c

@@ -15,6 +15,9 @@
  */
 
 #include <starpu.h>
+#ifdef BUILDING_STARPU
+#include <datawizard/memory_nodes.h>
+#endif
 
 static int copy_ram_to_ram(void *src_interface, unsigned src_node STARPU_ATTRIBUTE_UNUSED, void *dst_interface, unsigned dst_node);
 #ifdef STARPU_USE_CUDA

+ 3 - 0
src/datawizard/interfaces/tensor_interface.c

@@ -15,6 +15,9 @@
  */
 
 #include <starpu.h>
+#ifdef BUILDING_STARPU
+#include <datawizard/memory_nodes.h>
+#endif
 
 static int copy_any_to_any(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, void *async_data);
 

+ 3 - 0
src/datawizard/interfaces/variable_interface.c

@@ -15,6 +15,9 @@
  */
 
 #include <starpu.h>
+#ifdef BUILDING_STARPU
+#include <datawizard/memory_nodes.h>
+#endif
 
 static int copy_any_to_any(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, void *async_data);
 

+ 3 - 0
src/datawizard/interfaces/vector_interface.c

@@ -15,6 +15,9 @@
  */
 
 #include <starpu.h>
+#ifdef BUILDING_STARPU
+#include <datawizard/memory_nodes.h>
+#endif
 
 static int copy_any_to_any(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, void *async_data);
 

+ 3 - 0
src/datawizard/interfaces/void_interface.c

@@ -15,6 +15,9 @@
  */
 
 #include <starpu.h>
+#ifdef BUILDING_STARPU
+#include <datawizard/memory_nodes.h>
+#endif
 
 static int dummy_copy(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, void *async_data);
 

+ 1 - 0
src/datawizard/memory_manager.c

@@ -19,6 +19,7 @@
 #include <common/thread.h>
 #include <common/fxt.h>
 #include <datawizard/memory_manager.h>
+#include <datawizard/memory_nodes.h>
 #include <core/workers.h>
 #include <starpu_stdlib.h>
 

+ 1 - 0
src/datawizard/reduction.c

@@ -22,6 +22,7 @@
 #include <datawizard/datawizard.h>
 #include <drivers/mic/driver_mic_source.h>
 #include <drivers/mp_common/source_common.h>
+#include <datawizard/memory_nodes.h>
 
 void starpu_data_set_reduction_methods(starpu_data_handle_t handle,
 				       struct starpu_codelet *redux_cl,

+ 1 - 0
src/datawizard/user_interactions.c

@@ -22,6 +22,7 @@
 #include <datawizard/write_back.h>
 #include <core/dependencies/data_concurrency.h>
 #include <core/sched_policy.h>
+#include <datawizard/memory_nodes.h>
 
 static void _starpu_data_check_initialized(starpu_data_handle_t handle, enum starpu_data_access_mode mode)
 {

+ 1 - 0
src/datawizard/write_back.c

@@ -17,6 +17,7 @@
 #include <datawizard/datawizard.h>
 #include <datawizard/write_back.h>
 #include <core/dependencies/data_concurrency.h>
+#include <datawizard/memory_nodes.h>
 
 static void wt_callback(void *arg)
 {

+ 1 - 0
src/drivers/disk/driver_disk.c

@@ -21,6 +21,7 @@
 #include <drivers/disk/driver_disk.h>
 #include <drivers/cpu/driver_cpu.h>
 #include <datawizard/coherency.h>
+#include <datawizard/memory_nodes.h>
 
 int _starpu_disk_copy_src_to_disk(void * src, unsigned src_node, void * dst, size_t dst_offset, unsigned dst_node, size_t size, void * async_channel)
 {

+ 1 - 0
src/drivers/driver_common/driver_common.c

@@ -27,6 +27,7 @@
 #include <core/sched_policy.h>
 #include <core/debug.h>
 #include <core/task.h>
+#include <datawizard/memory_nodes.h>
 
 
 void _starpu_driver_start_job(struct _starpu_worker *worker, struct _starpu_job *j, struct starpu_perfmodel_arch* perf_arch, int rank, int profiling)

+ 1 - 0
src/profiling/bound.c

@@ -26,6 +26,7 @@
 #include <profiling/bound.h>
 #include <core/jobs.h>
 #include <core/workers.h>
+#include <datawizard/memory_nodes.h>
 
 #ifdef STARPU_HAVE_GLPK_H
 #include <glpk.h>

+ 2 - 0
src/sched_policies/component_best_implementation.c

@@ -19,7 +19,9 @@
 
 #include <starpu_sched_component.h>
 #include <starpu_scheduler.h>
+#ifdef BUILDING_STARPU
 #include <core/workers.h>
+#endif
 
 /* return true if workerid can execute task, and fill task->predicted and task->predicted_transfer
  *  according to best implementation predictions

+ 3 - 0
src/sched_policies/component_eager.c

@@ -16,6 +16,9 @@
 
 #include <starpu_sched_component.h>
 #include <starpu_scheduler.h>
+#ifdef BUILDING_STARPU
+#include <core/workers.h>
+#endif
 
 struct _starpu_eager_data
 {

+ 1 - 0
src/sched_policies/component_sched.c

@@ -19,6 +19,7 @@
 #include <core/workers.h>
 #include <starpu_sched_component.h>
 #include <starpu_thread_util.h>
+#include <datawizard/memory_nodes.h>
 
 #include <float.h>
 

+ 3 - 0
src/sched_policies/deque_modeling_policy_data_aware.c

@@ -30,6 +30,9 @@
 #include <core/workers.h>
 #include <core/sched_policy.h>
 #include <core/debug.h>
+#ifdef BUILDING_STARPU
+#include <datawizard/memory_nodes.h>
+#endif
 
 #include <sched_policies/fifo_queues.h>
 #include <limits.h>

+ 2 - 0
src/sched_policies/modular_ez.c

@@ -18,6 +18,8 @@
 #include <starpu_sched_component.h>
 #include <starpu_scheduler.h>
 #include <limits.h>
+#include <core/workers.h>
+#include <datawizard/memory_nodes.h>
 
 /* The scheduling strategy may look like this :
  *

+ 1 - 0
src/util/execute_on_all.c

@@ -18,6 +18,7 @@
 #include <common/config.h>
 #include <core/jobs.h>
 #include <core/task.h>
+#include <core/workers.h>
 
 struct wrapper_func_args
 {

+ 1 - 0
src/util/openmp_runtime_support.c

@@ -32,6 +32,7 @@
 #include <stdlib.h>
 #include <ctype.h>
 #include <strings.h>
+#include <datawizard/memory_nodes.h>
 
 #define _STARPU_INITIAL_THREAD_STACKSIZE 2097152
 

+ 1 - 0
src/util/starpu_data_cpy.c

@@ -22,6 +22,7 @@
 #include <datawizard/datawizard.h>
 #include <util/starpu_data_cpy.h>
 #include <starpu_mic.h>
+#include <datawizard/memory_nodes.h>
 
 static void common_data_cpy_func(void *descr[], void *cl_arg)
 {