Browse Source

include: fix function prototypes

Nathalie Furmento 11 years ago
parent
commit
4db8dc19b1
2 changed files with 28 additions and 31 deletions
  1. 22 23
      include/starpu_bitmap.h
  2. 6 8
      include/starpu_tree.h

+ 22 - 23
include/starpu_bitmap.h

@@ -1,6 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2013  Simon Archipoff
+ * Copyright (C) 2014  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
@@ -16,34 +17,32 @@
 
 #ifndef __STARPU_BITMAP_H__
 #define __STARPU_BITMAP_H__
-struct starpu_bitmap * starpu_bitmap_create(void);
-void starpu_bitmap_destroy(struct starpu_bitmap *);
 
-void starpu_bitmap_set(struct starpu_bitmap *, int);
-void starpu_bitmap_unset(struct starpu_bitmap *, int);
-void starpu_bitmap_unset_all(struct starpu_bitmap *);
-
-int starpu_bitmap_get(struct starpu_bitmap *, int);
+#ifdef __cplusplus
+extern "C"
+{
+#endif
 
-/* basicaly compute starpu_bitmap_unset_all(a) ; a = b & c; */
-void starpu_bitmap_unset_and(struct starpu_bitmap * a, struct starpu_bitmap * b, struct starpu_bitmap * c);
+struct starpu_bitmap *starpu_bitmap_create(void);
+void starpu_bitmap_destroy(struct starpu_bitmap *b);
 
-/* this is basically compute a |= b;*/
-void starpu_bitmap_or(struct starpu_bitmap * a,
-		       struct starpu_bitmap * b);
+void starpu_bitmap_set(struct starpu_bitmap *b, int e);
+void starpu_bitmap_unset(struct starpu_bitmap *b, int e);
+void starpu_bitmap_unset_all(struct starpu_bitmap *b);
 
-//return 1 iff e set in b1 AND e set in b2
-int starpu_bitmap_and_get(struct starpu_bitmap * b1,
-			   struct starpu_bitmap * b2,
-			   int e);
+int starpu_bitmap_get(struct starpu_bitmap *b, int e);
+void starpu_bitmap_unset_and(struct starpu_bitmap *a, struct starpu_bitmap *b, struct starpu_bitmap *c);
+void starpu_bitmap_or(struct starpu_bitmap *a, struct starpu_bitmap *b);
+int starpu_bitmap_and_get(struct starpu_bitmap *b1, struct starpu_bitmap *b2, int e);
+int starpu_bitmap_cardinal(struct starpu_bitmap *b);
 
-int starpu_bitmap_cardinal(struct starpu_bitmap *);
+int starpu_bitmap_first(struct starpu_bitmap *b);
+int starpu_bitmap_last(struct starpu_bitmap *b);
+int starpu_bitmap_next(struct starpu_bitmap *b, int e);
+int starpu_bitmap_has_next(struct starpu_bitmap *b, int e);
 
-//return the index of first bit, -1 if none
-int starpu_bitmap_first(struct starpu_bitmap *);
-int starpu_bitmap_last(struct starpu_bitmap *);
-//return the index of bit right after e, -1 if none
-int starpu_bitmap_next(struct starpu_bitmap *, int e);
-int starpu_bitmap_has_next(struct starpu_bitmap * b, int e);
+#ifdef __cplusplus
+}
+#endif
 
 #endif

+ 6 - 8
include/starpu_tree.h

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009-2013  Université de Bordeaux 1
- * Copyright (C) 2010-2013  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010-2014  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
@@ -23,9 +23,8 @@ extern "C"
 {
 #endif
 
-
-#include <stdlib.h>
-struct starpu_tree {
+struct starpu_tree
+{
 	struct starpu_tree **nodes;
 	struct starpu_tree *father;
 	int arity;
@@ -35,12 +34,12 @@ struct starpu_tree {
 };
 
 void starpu_tree_reset_visited(struct starpu_tree *tree, int *visited);
- 
+
 void starpu_tree_insert(struct starpu_tree *tree, int id, int level, int is_pu, int arity, struct starpu_tree *father);
 
-struct starpu_tree* starpu_tree_get(struct starpu_tree *tree, int id);
+struct starpu_tree *starpu_tree_get(struct starpu_tree *tree, int id);
 
-struct starpu_tree* starpu_tree_get_neighbour (struct starpu_tree *tree, struct starpu_tree *node, int *visited, int *present);
+struct starpu_tree *starpu_tree_get_neighbour(struct starpu_tree *tree, struct starpu_tree *node, int *visited, int *present);
 
 int starpu_tree_free(struct starpu_tree *tree);
 
@@ -49,4 +48,3 @@ int starpu_tree_free(struct starpu_tree *tree);
 #endif
 
 #endif /* __STARPU_TREE_H__ */
-