Преглед изворни кода

port r11427 from 1.1: Do not increase tag assignment counter when we assign the same tag to the same task again

Samuel Thibault пре 11 година
родитељ
комит
82c128ad85
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      src/core/dependencies/tags.c

+ 2 - 1
src/core/dependencies/tags.c

@@ -313,8 +313,9 @@ void _starpu_tag_declare(starpu_tag_t id, struct _starpu_job *job)
 	 * detect when either of them are finished. We however don't allow
 	 * several tasks to share a tag when it is used to wake them by
 	 * dependency */
+	if (tag->job != job)
+		tag->is_assigned++;
 	tag->job = job;
-	tag->is_assigned++;
 
 	job->tag = tag;
 	/* the tag is now associated to a job */