Browse Source

non-lin regression: ignore entries which do not actually have measurements

Debunked by Mirko Myllykoski
Samuel Thibault 5 years ago
parent
commit
2363071bea
1 changed files with 8 additions and 4 deletions
  1. 8 4
      src/core/perfmodel/regression.c

+ 8 - 4
src/core/perfmodel/regression.c

@@ -119,7 +119,8 @@ static unsigned find_list_size(struct starpu_perfmodel_history_list *list_histor
 	struct starpu_perfmodel_history_list *ptr = list_history;
 	while (ptr)
 	{
-		cnt++;
+		if (ptr->entry->nsample)
+			cnt++;
 		ptr = ptr->next;
 	}
 
@@ -146,11 +147,14 @@ static void dump_list(unsigned *x, double *y, struct starpu_perfmodel_history_li
 
 	while (ptr)
 	{
-		x[i] = ptr->entry->size;
-		y[i] = ptr->entry->mean;
+		if (ptr->entry->nsample)
+		{
+			x[i] = ptr->entry->size;
+			y[i] = ptr->entry->mean;
+			i++;
+		}
 
 		ptr = ptr->next;
-		i++;
 	}
 }