Andra Hugo 13 年 前
コミット
f9c6f0de39

+ 7 - 3
gcc-plugin/examples/cholesky/cholesky.c

@@ -2,7 +2,7 @@
  *
  *
  * Copyright (C) 2009-2011  Université de Bordeaux 1
  * Copyright (C) 2009-2011  Université de Bordeaux 1
  * Copyright (C) 2010  Mehdi Juhoor <mjuhoor@gmail.com>
  * Copyright (C) 2010  Mehdi Juhoor <mjuhoor@gmail.com>
- * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
  * it under the terms of the GNU Lesser General Public License as published by
@@ -44,7 +44,9 @@ static void dw_cholesky(unsigned nblocks, unsigned size, unsigned ld, float *mat
 
 
 	for (k = 0; k < nblocks; k++)
 	for (k = 0; k < nblocks; k++)
         {
         {
-#warning deal with prio and models
+#ifdef STARPU_DEVEL
+#  warning deal with prio and models
+#endif
 //                int prio = STARPU_DEFAULT_PRIO;
 //                int prio = STARPU_DEFAULT_PRIO;
 //                if (!noprio) prio = STARPU_MAX_PRIO;
 //                if (!noprio) prio = STARPU_MAX_PRIO;
 
 
@@ -99,7 +101,9 @@ int main(int argc, char **argv)
 
 
 	parse_args(argc, argv);
 	parse_args(argc, argv);
 
 
-#warning todo
+#ifdef STARPU_DEVEL
+#  warning todo
+#endif
 //	struct starpu_conf conf;
 //	struct starpu_conf conf;
 //	starpu_conf_init(&conf);
 //	starpu_conf_init(&conf);
 //	conf.sched_policy_name = "heft";
 //	conf.sched_policy_name = "heft";

+ 1 - 0
gcc-plugin/examples/vector_scal/vector_scal.c

@@ -21,6 +21,7 @@
    "vector scaling" task with multiple CPU implementations, an OpenCL
    "vector scaling" task with multiple CPU implementations, an OpenCL
    implementation, and a CUDA implementation.   */
    implementation, and a CUDA implementation.   */
 
 
+#include <math.h>
 #include <stdbool.h>
 #include <stdbool.h>
 #include <stdio.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdlib.h>

+ 0 - 3
include/starpu_data_filters.h

@@ -32,9 +32,6 @@ struct starpu_data_interface_ops;
 struct starpu_data_filter
 struct starpu_data_filter
 {
 {
 	void (*filter_func)(void *father_interface, void *child_interface, struct starpu_data_filter *, unsigned id, unsigned nparts);
 	void (*filter_func)(void *father_interface, void *child_interface, struct starpu_data_filter *, unsigned id, unsigned nparts);
-        unsigned (*get_nchildren)(struct starpu_data_filter *, starpu_data_handle initial_handle);
-        struct starpu_data_interface_ops_t *(*get_child_ops)(struct starpu_data_filter *, unsigned id);
-        unsigned filter_arg;
         unsigned nchildren;
         unsigned nchildren;
         unsigned (*get_nchildren)(struct starpu_data_filter *, starpu_data_handle_t initial_handle);
         unsigned (*get_nchildren)(struct starpu_data_filter *, starpu_data_handle_t initial_handle);
         struct starpu_data_interface_ops *(*get_child_ops)(struct starpu_data_filter *, unsigned id);
         struct starpu_data_interface_ops *(*get_child_ops)(struct starpu_data_filter *, unsigned id);

+ 0 - 15
include/starpu_data_interfaces.h

@@ -350,27 +350,19 @@ size_t starpu_bcsr_get_elemsize(starpu_data_handle_t handle);
 struct starpu_multiformat_data_interface_ops
 struct starpu_multiformat_data_interface_ops
 {
 {
 	size_t cpu_elemsize;
 	size_t cpu_elemsize;
-#ifdef STARPU_USE_OPENCL
 	size_t opencl_elemsize;
 	size_t opencl_elemsize;
 	struct starpu_codelet *cpu_to_opencl_cl;
 	struct starpu_codelet *cpu_to_opencl_cl;
 	struct starpu_codelet *opencl_to_cpu_cl;
 	struct starpu_codelet *opencl_to_cpu_cl;
-#endif
-#ifdef STARPU_USE_CUDA
 	size_t cuda_elemsize;
 	size_t cuda_elemsize;
 	struct starpu_codelet *cpu_to_cuda_cl;
 	struct starpu_codelet *cpu_to_cuda_cl;
 	struct starpu_codelet *cuda_to_cpu_cl;
 	struct starpu_codelet *cuda_to_cpu_cl;
-#endif
 };
 };
 
 
 struct starpu_multiformat_interface
 struct starpu_multiformat_interface
 {
 {
 	void *cpu_ptr;
 	void *cpu_ptr;
-#ifdef STARPU_USE_CUDA
 	void *cuda_ptr;
 	void *cuda_ptr;
-#endif
-#ifdef STARPU_USE_OPENCL
 	void *opencl_ptr;
 	void *opencl_ptr;
-#endif
 	uint32_t nx;
 	uint32_t nx;
 	struct starpu_multiformat_data_interface_ops *ops;
 	struct starpu_multiformat_data_interface_ops *ops;
 };
 };
@@ -378,15 +370,8 @@ struct starpu_multiformat_interface
 void starpu_multiformat_data_register(starpu_data_handle_t *handle, uint32_t home_node, void *ptr, uint32_t nobjects, struct starpu_multiformat_data_interface_ops *format_ops);
 void starpu_multiformat_data_register(starpu_data_handle_t *handle, uint32_t home_node, void *ptr, uint32_t nobjects, struct starpu_multiformat_data_interface_ops *format_ops);
 
 
 #define STARPU_MULTIFORMAT_GET_CPU_PTR(interface)  (((struct starpu_multiformat_interface *)(interface))->cpu_ptr)
 #define STARPU_MULTIFORMAT_GET_CPU_PTR(interface)  (((struct starpu_multiformat_interface *)(interface))->cpu_ptr)
-
-#ifdef STARPU_USE_CUDA
 #define STARPU_MULTIFORMAT_GET_CUDA_PTR(interface) (((struct starpu_multiformat_interface *)(interface))->cuda_ptr)
 #define STARPU_MULTIFORMAT_GET_CUDA_PTR(interface) (((struct starpu_multiformat_interface *)(interface))->cuda_ptr)
-#endif
-
-#ifdef STARPU_USE_OPENCL
 #define STARPU_MULTIFORMAT_GET_OPENCL_PTR(interface) (((struct starpu_multiformat_interface *)(interface))->opencl_ptr)
 #define STARPU_MULTIFORMAT_GET_OPENCL_PTR(interface) (((struct starpu_multiformat_interface *)(interface))->opencl_ptr)
-#endif
-
 #define STARPU_MULTIFORMAT_GET_NX(interface)  (((struct starpu_multiformat_interface *)(interface))->nx)
 #define STARPU_MULTIFORMAT_GET_NX(interface)  (((struct starpu_multiformat_interface *)(interface))->nx)
 
 
 enum starpu_data_interface_id starpu_handle_get_interface_id(starpu_data_handle_t handle);
 enum starpu_data_interface_id starpu_handle_get_interface_id(starpu_data_handle_t handle);

+ 2 - 2
include/starpu_util.h

@@ -36,8 +36,8 @@ extern "C"
 #define STARPU_MAX(a,b)	((a)<(b)?(b):(a))
 #define STARPU_MAX(a,b)	((a)<(b)?(b):(a))
 
 
 #ifdef STARPU_NO_ASSERT
 #ifdef STARPU_NO_ASSERT
-#define STARPU_ASSERT(x)		do {} while(0)
-#define STARPU_ASSERT_MSG(x, msg)	do {} while(0)
+#define STARPU_ASSERT(x)		do { (void) (x);} while(0)
+#define STARPU_ASSERT_MSG(x, msg)	do { (void) (x);} while(0)
 #else
 #else
 #  if defined(__CUDACC__) && defined(STARPU_HAVE_WINDOWS)
 #  if defined(__CUDACC__) && defined(STARPU_HAVE_WINDOWS)
 #    define STARPU_ASSERT(x)		do { if (!(x)) *(int*)NULL = 0; } while(0)
 #    define STARPU_ASSERT(x)		do { if (!(x)) *(int*)NULL = 0; } while(0)

+ 1 - 1
socl/examples/Makefile.am

@@ -35,7 +35,7 @@ LOADER			=	loader
 loader_CPPFLAGS 	=	$(AM_CFLAGS) $(AM_CPPFLAGS) -I$(top_builddir)/src/
 loader_CPPFLAGS 	=	$(AM_CFLAGS) $(AM_CPPFLAGS) -I$(top_builddir)/src/
 LOADER_BIN		=	$(abs_top_builddir)/socl/examples/$(LOADER)
 LOADER_BIN		=	$(abs_top_builddir)/socl/examples/$(LOADER)
 loader_SOURCES		=	../../tests/loader.c
 loader_SOURCES		=	../../tests/loader.c
-TESTS_ENVIRONMENT	=	top_builddir="$(abs_top_builddir)" $(LOADER_BIN)
+TESTS_ENVIRONMENT	=	top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)" $(LOADER_BIN)
 endif
 endif
 
 
 examplebindir = $(libdir)/starpu/examples/socl/
 examplebindir = $(libdir)/starpu/examples/socl/