瀏覽代碼

Fix choosing the right CPU for driving GPU

Samuel Thibault 13 年之前
父節點
當前提交
af21f804df
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/core/perfmodel/perfmodel_bus.c

+ 3 - 3
src/core/perfmodel/perfmodel_bus.c

@@ -341,11 +341,11 @@ static int compar_dev_timing(const void *left_dev_timing, const void *right_dev_
 	double right_dtoh = right->timing_dtoh;
 	double right_htod = right->timing_htod;
 
-	double bandwidth_sum2_left = left_dtoh*left_dtoh + left_htod*left_htod;
-	double bandwidth_sum2_right = right_dtoh*right_dtoh + right_htod*right_htod;
+	double timing_sum2_left = left_dtoh*left_dtoh + left_htod*left_htod;
+	double timing_sum2_right = right_dtoh*right_dtoh + right_htod*right_htod;
 
 	/* it's for a decreasing sorting */
-	return (bandwidth_sum2_left < bandwidth_sum2_right);
+	return (timing_sum2_left > timing_sum2_right);
 }
 
 #ifdef STARPU_HAVE_HWLOC