Forráskód Böngészése

Fix some minor warnings

Cédric Augonnet 14 éve
szülő
commit
8fd1b3f616

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

@@ -32,6 +32,10 @@
 #include <core/workers.h>
 #include <core/perfmodel/perfmodel.h>
 
+#ifdef STARPU_USE_OPENCL
+#include <starpu_opencl.h>
+#endif
+
 #ifdef STARPU_HAVE_WINDOWS
 #include <windows.h>
 #endif

+ 2 - 0
src/drivers/opencl/driver_opencl_utils.c

@@ -200,8 +200,10 @@ cl_int starpu_opencl_unload_opencl(struct starpu_opencl_program *opencl_programs
 
 int starpu_opencl_collect_stats(cl_event event __attribute__((unused)))
 {
+#if defined(CL_PROFILING_CLOCK_CYCLE_COUNT)||defined(CL_PROFILING_STALL_CYCLE_COUNT)||defined(CL_PROFILING_POWER_CONSUMED)
 	struct starpu_task *task = starpu_get_current_task();
 	struct starpu_task_profiling_info *info = task->profiling_info;
+#endif
 
 #ifdef CL_PROFILING_CLOCK_CYCLE_COUNT
 	if (starpu_profiling_status_get() && info) {

+ 2 - 0
tests/datawizard/write_only_tmp_buffer.c

@@ -27,6 +27,8 @@ starpu_data_handle v_handle;
 
 #ifdef STARPU_USE_OPENCL
 #include <CL/cl.h>
+#include <starpu_opencl.h>
+
 static void opencl_codelet_null(void *descr[], __attribute__ ((unused)) void *_args)
 {
 	cl_mem buf = (cl_mem)STARPU_VECTOR_GET_PTR(descr[0]);