Explorar o código

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

Samuel Thibault %!s(int64=11) %!d(string=hai) anos
pai
achega
82c128ad85
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  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 */