Browse Source

Be a little more consistent and rename "struct _cg_t" into "struct cg_s".

Cédric Augonnet 15 years ago
parent
commit
c432ceec2f
2 changed files with 7 additions and 7 deletions
  1. 4 4
      src/core/dependencies/tags.c
  2. 3 3
      src/core/dependencies/tags.h

+ 4 - 4
src/core/dependencies/tags.c

@@ -72,7 +72,7 @@ static struct tag_s *_starpu_tag_init(starpu_tag_t id)
 #ifdef DYNAMIC_DEPS_SIZE
 #ifdef DYNAMIC_DEPS_SIZE
 	/* this is a small initial default value ... may be changed */
 	/* this is a small initial default value ... may be changed */
 	tag->succ_list_size = 4;
 	tag->succ_list_size = 4;
-	tag->succ = realloc(NULL, tag->succ_list_size*sizeof(struct _cg_t *));
+	tag->succ = realloc(NULL, tag->succ_list_size*sizeof(struct cg_s *));
 #endif
 #endif
 
 
 	starpu_spin_init(&tag->lock);
 	starpu_spin_init(&tag->lock);
@@ -98,7 +98,7 @@ void starpu_tag_remove(starpu_tag_t id)
 
 
 		for (succ = 0; succ < nsuccs; succ++)
 		for (succ = 0; succ < nsuccs; succ++)
 		{
 		{
-			struct _cg_t *cg = tag->succ[succ];
+			struct cg_s *cg = tag->succ[succ];
 			unsigned used_by_apps = cg->used_by_apps;
 			unsigned used_by_apps = cg->used_by_apps;
 
 
 			unsigned ntags = STARPU_ATOMIC_ADD(&cg->ntags, -1);
 			unsigned ntags = STARPU_ATOMIC_ADD(&cg->ntags, -1);
@@ -214,7 +214,7 @@ static void _starpu_tag_add_succ(struct tag_s *tag, cg_t *cg)
 
 
 		/* NB: this is thread safe as the tag->lock is taken */
 		/* NB: this is thread safe as the tag->lock is taken */
 		tag->succ = realloc(tag->succ, 
 		tag->succ = realloc(tag->succ, 
-			tag->succ_list_size*sizeof(struct _cg_t *));
+			tag->succ_list_size*sizeof(struct cg_s *));
 	}
 	}
 #else
 #else
 	STARPU_ASSERT(index < NMAXDEPS);
 	STARPU_ASSERT(index < NMAXDEPS);
@@ -242,7 +242,7 @@ static void _starpu_notify_tag_dependencies(struct tag_s *tag)
 
 
 	for (succ = 0; succ < nsuccs; succ++)
 	for (succ = 0; succ < nsuccs; succ++)
 	{
 	{
-		struct _cg_t *cg = tag->succ[succ];
+		struct cg_s *cg = tag->succ[succ];
 		unsigned used_by_apps = cg->used_by_apps;
 		unsigned used_by_apps = cg->used_by_apps;
 		struct tag_s *cgtag = cg->tag;
 		struct tag_s *cgtag = cg->tag;
 
 

+ 3 - 3
src/core/dependencies/tags.h

@@ -62,9 +62,9 @@ struct tag_s {
 	unsigned ndeps_completed; /* how many deps are done ? */
 	unsigned ndeps_completed; /* how many deps are done ? */
 #ifdef DYNAMIC_DEPS_SIZE
 #ifdef DYNAMIC_DEPS_SIZE
 	unsigned succ_list_size;
 	unsigned succ_list_size;
-	struct _cg_t **succ;
+	struct cg_s **succ;
 #else
 #else
-	struct _cg_t *succ[NMAXDEPS];
+	struct cg_s *succ[NMAXDEPS];
 #endif
 #endif
 	struct job_s *job; /* which job is associated to the tag if any ? */
 	struct job_s *job; /* which job is associated to the tag if any ? */
 
 
@@ -73,7 +73,7 @@ struct tag_s {
 };
 };
 
 
 /* Completion Group */
 /* Completion Group */
-typedef struct _cg_t {
+typedef struct cg_s {
 	unsigned ntags; /* number of tags depended on */
 	unsigned ntags; /* number of tags depended on */
 	unsigned remaining; /* number of remaining tags */
 	unsigned remaining; /* number of remaining tags */
 	struct tag_s *tag; /* which tags depends on that cg ?  */
 	struct tag_s *tag; /* which tags depends on that cg ?  */