TreeMapLB: Give headers include guards and extern "C"
authorPhil Miller <mille121@illinois.edu>
Sun, 25 Dec 2011 06:01:59 +0000 (00:01 -0600)
committerPhil Miller <mille121@illinois.edu>
Sun, 25 Dec 2011 07:49:17 +0000 (01:49 -0600)
src/ck-ldb/TreeMatchLB.C
src/ck-ldb/tm_mapping.h
src/ck-ldb/tm_tree.h

index 79eb21d5558563c81b2c37f9b94b217569eb69fa..bfd2f3b8f894616a90b27d489a5ca8ac6d17141d 100644 (file)
@@ -4,10 +4,8 @@
 /*@{*/
 
 #include <charm++.h>
-extern "C"{
 #include "tm_tree.h"
 #include "tm_mapping.h"
-};
 #include "TreeMatchLB.h"
 #include "ckgraph.h"
 #include <algorithm>
index 1152ca27da59444966cd977dc713cbd79b0f1eb8..1074d5f4bcab354883ef677a268a37c6b88b85b6 100644 (file)
@@ -1,3 +1,10 @@
+#ifndef TM_MAPPING_H
+#define TM_MAPPING_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include "tm_tree.h"
 int  build_comm(char *filename,double ***pcomm);
 void TreeMatchMapping(int nb_obj, int nb_proc,double **comm_mat,  double * obj_weigth, double *com_speed, int d, int *sol);
@@ -23,3 +30,10 @@ void print_1D_tab(int *tab,int N);
 void   build_synthetic_proc_id(tm_topology_t *topology);
 void display_topology(tm_topology_t *topology);
 tm_topology_t  *build_synthetic_topology(int *arity, int nb_levels, int *core_numbering, int nb_core_per_node);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
index 4451d7baff5defc944952c278e9d73dd2d20e9e1..6a209843c09f21312039cc261a673c178821c20f 100644 (file)
@@ -1,6 +1,9 @@
 #ifndef __TREE_H__
 #define __TREE_H__
-#include <stdlib.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 typedef struct _tree_t{
   struct _tree_t **child;
@@ -52,5 +55,11 @@ typedef struct{
   double val;
 }adjacency_t;
 
+
+#ifdef __cplusplus
+}
+#endif
+
+
 #endif