Explorar el Código

cublas: move helper cublas functions to include/starpu_cublas.h and src/drivers/cuda/starpu_cublas.c

Nathalie Furmento hace 12 años
padre
commit
0b03022752
Se han modificado 6 ficheros con 30 adiciones y 6 borrados
  1. 2 1
      Makefile.am
  2. 1 0
      include/starpu.h
  3. 25 0
      include/starpu_cublas.h
  4. 0 4
      include/starpu_util.h
  5. 2 1
      src/Makefile.am
  6. 0 0
      src/drivers/cuda/starpu_cublas.c

+ 2 - 1
Makefile.am

@@ -62,7 +62,8 @@ versinclude_HEADERS = 				\
 	include/starpu_top.h			\
 	include/starpu_deprecated_api.h         \
 	include/starpu_hash.h			\
-	include/starpu_rand.h
+	include/starpu_rand.h			\
+	include/starpu_cublas.h
 
 nodist_versinclude_HEADERS = 			\
 	include/starpu_config.h

+ 1 - 0
include/starpu.h

@@ -45,6 +45,7 @@ typedef unsigned long long uint64_t;
 #include <starpu_scheduler.h>
 #include <starpu_expert.h>
 #include <starpu_rand.h>
+#include <starpu_cublas.h>
 
 #ifdef __cplusplus
 extern "C"

+ 25 - 0
include/starpu_cublas.h

@@ -0,0 +1,25 @@
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2010-2012  Université de Bordeaux 1
+ * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ *
+ * 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
+ * the Free Software Foundation; either version 2.1 of the License, or (at
+ * your option) any later version.
+ *
+ * StarPU is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * See the GNU Lesser General Public License in COPYING.LGPL for more details.
+ */
+
+#ifndef __STARPU_CUBLAS_H__
+#define __STARPU_CUBLAS_H__
+
+/* Some helper functions for application using CUBLAS kernels */
+void starpu_helper_cublas_init(void);
+void starpu_helper_cublas_shutdown(void);
+
+#endif /* __STARPU_CUBLAS_H__ */

+ 0 - 4
include/starpu_util.h

@@ -213,10 +213,6 @@ static __inline int starpu_get_env_number(const char *str)
 /* Add an event in the execution trace if FxT is enabled */
 void starpu_trace_user_event(unsigned long code);
 
-/* Some helper functions for application using CUBLAS kernels */
-void starpu_helper_cublas_init(void);
-void starpu_helper_cublas_shutdown(void);
-
 /* Call func(arg) on every worker matching the "where" mask (eg.
  * STARPU_CUDA|STARPU_CPU to execute the function on every CPU and every CUDA
  * device). This function is synchronous, but the different workers may execute

+ 2 - 1
src/Makefile.am

@@ -187,7 +187,6 @@ libstarpu_@STARPU_EFFECTIVE_VERSION@_la_SOURCES = 						\
 	util/malloc.c						\
 	util/execute_on_all.c					\
 	util/starpu_create_sync_task.c				\
-	util/starpu_cublas.c					\
 	util/file.c						\
 	util/starpu_data_cpy.c					\
 	util/starpu_insert_task.c				\
@@ -215,6 +214,8 @@ if STARPU_USE_CUDA
 libstarpu_@STARPU_EFFECTIVE_VERSION@_la_SOURCES += drivers/cuda/driver_cuda.c
 endif
 
+libstarpu_@STARPU_EFFECTIVE_VERSION@_la_SOURCES += drivers/cuda/starpu_cublas.c
+
 if STARPU_USE_GORDON
 libstarpu_@STARPU_EFFECTIVE_VERSION@_la_SOURCES += drivers/gordon/driver_gordon.c
 endif

src/util/starpu_cublas.c → src/drivers/cuda/starpu_cublas.c