소스 검색

Fix some minor warnings

Cédric Augonnet 14 년 전
부모
커밋
8fd1b3f616
3개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      src/core/perfmodel/perfmodel_bus.c
  2. 2 0
      src/drivers/opencl/driver_opencl_utils.c
  3. 2 0
      tests/datawizard/write_only_tmp_buffer.c

+ 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]);