Selaa lähdekoodia

Add missing C++ guards

Samuel Thibault 13 vuotta sitten
vanhempi
commit
df7fc98be6

+ 11 - 1
include/starpu_bound.h

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010  Université de Bordeaux 1
+ * Copyright (C) 2010-2011  Université de Bordeaux 1
  *
  * 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
@@ -22,6 +22,12 @@
 #ifndef __STARPU_BOUND_H__
 #define __STARPU_BOUND_H__
 
+#include <stdio.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Start recording tasks (resets stats).  `deps' tells whether dependencies
  * should be recorded too (this is quite expensive).  */
 void starpu_bound_start(int deps, int prio);
@@ -43,4 +49,8 @@ void starpu_bound_print_mps(FILE *output);
 /* Emit statistics of actual execution vs theoretical upper bound */
 void starpu_bound_print(FILE *output, int integer);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __STARPU_BOUND_H__ */

+ 8 - 0
include/starpu_scheduler.h

@@ -29,6 +29,10 @@
 #include <hwloc.h>
 #endif
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct starpu_task;
 
 struct starpu_machine_topology_s {
@@ -180,4 +184,8 @@ double starpu_data_expected_transfer_time(starpu_data_handle handle, unsigned me
 /* Returns expected power consumption in J */
 double starpu_task_expected_power(struct starpu_task *task, enum starpu_perf_archtype arch, unsigned nimpl);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __STARPU_SCHEDULER_H__ */

+ 8 - 0
include/starpu_task_bundle.h

@@ -25,6 +25,10 @@
 #  include <pthread.h>
 #endif
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct starpu_task_bundle_entry {
 	struct starpu_task *task;
 	struct starpu_task_bundle_entry *next;
@@ -78,4 +82,8 @@ double starpu_task_bundle_expected_data_transfer_time(struct starpu_task_bundle
 /* Return the expected power consumption of the entire task bundle in J. */
 double starpu_task_bundle_expected_power(struct starpu_task_bundle *bundle,  enum starpu_perf_archtype arch, unsigned nimpl);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // __STARPU_TASK_BUNDLE_H__

+ 10 - 1
include/starpu_task_list.h

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010  Université de Bordeaux 1
+ * Copyright (C) 2010-2011  Université de Bordeaux 1
  *
  * 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
@@ -19,6 +19,10 @@
 
 #include <starpu_task.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct starpu_task_list {
 	struct starpu_task *head;
 	struct starpu_task *tail;
@@ -51,4 +55,9 @@ struct starpu_task *starpu_task_list_pop_front(struct starpu_task_list *list);
 /* Remove the element at the back of the list */
 struct starpu_task *starpu_task_list_pop_back(struct starpu_task_list *list);
 						
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __STARPU_TASK_LIST_H__ */

+ 9 - 1
mpi/starpu_mpi.h

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2009, 2010  Université de Bordeaux 1
+ * Copyright (C) 2009-2011  Université de Bordeaux 1
  * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -21,6 +21,10 @@
 #include <starpu.h>
 #include <mpi.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef void *starpu_mpi_req;
 
 int starpu_mpi_isend(starpu_data_handle data_handle, starpu_mpi_req *req, int dest, int mpi_tag, MPI_Comm comm);
@@ -57,4 +61,8 @@ int starpu_mpi_irecv_array_detached_unlock_tag(unsigned array_size,
 		starpu_data_handle *data_handle, int *source, int *mpi_tag,
 		MPI_Comm *comm, starpu_tag_t tag);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // __STARPU_MPI_H__

+ 9 - 1
mpi/starpu_mpi_datatype.h

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2009, 2010  Université de Bordeaux 1
+ * Copyright (C) 2009-2011  Université de Bordeaux 1
  * Copyright (C) 2010  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -20,7 +20,15 @@
 
 #include <starpu_mpi.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int starpu_mpi_handle_to_datatype(starpu_data_handle data_handle, MPI_Datatype *datatype);
 void *starpu_mpi_handle_to_ptr(starpu_data_handle data_handle);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // __STARPU_MPI_DATATYPE_H__