Explorar el Código

include/: add C++ scope

Nathalie Furmento hace 12 años
padre
commit
00c2b444d2
Se han modificado 2 ficheros con 21 adiciones y 3 borrados
  1. 11 2
      include/starpu_fxt.h
  2. 10 1
      include/starpu_rand.h

+ 11 - 2
include/starpu_fxt.h

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010-2011  Université de Bordeaux 1
- * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2013  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
@@ -20,6 +20,11 @@
 
 #include <starpu_perfmodel.h>
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 #define STARPU_FXT_MAX_FILES	64
 
 struct starpu_fxt_codelet_event
@@ -54,7 +59,7 @@ struct starpu_fxt_options
 	 *	Output parameters
 	 */
 
-	char worker_names[STARPU_NMAXWORKERS][256]; 
+	char worker_names[STARPU_NMAXWORKERS][256];
 	enum starpu_perf_archtype worker_archtypes[STARPU_NMAXWORKERS];
 	int nworkers;
 
@@ -67,4 +72,8 @@ void starpu_fxt_options_init(struct starpu_fxt_options *options);
 void starpu_fxt_generate_trace(struct starpu_fxt_options *options);
 void starpu_start_fxt_profiling();
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __STARPU_FXT_H__ */

+ 10 - 1
include/starpu_rand.h

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2012, 2013  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
@@ -20,6 +20,11 @@
 #include <stdlib.h>
 #include <starpu_config.h>
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 #ifdef STARPU_USE_DRAND48
 #  define starpu_srand48(seed)				srand48(seed)
 #  define starpu_drand48()				drand48()
@@ -42,4 +47,8 @@ typedef int starpu_drand48_data;
 #  define starpu_erand48_r(xsubi, buffer, result)	do {*(result) = ((double)(rand()) / RAND_MAX);} while (0)
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __STARPU_RAND_H__ */