瀏覽代碼

Since we do not have pivoting, make the diagonal dominant to avoid numerical issues

Samuel Thibault 12 年之前
父節點
當前提交
06e0329e0b
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      examples/lu/lu_example.c

+ 2 - 0
examples/lu/lu_example.c

@@ -182,6 +182,8 @@ static void init_matrix(void)
 			/* also randomize the imaginary component for complex number cases */
 			/* also randomize the imaginary component for complex number cases */
 			A[i + j*size] += (TYPE)(I*starpu_drand48());
 			A[i + j*size] += (TYPE)(I*starpu_drand48());
 #endif
 #endif
+			if (i == j)
+				A[i + j*size] *= 100;
 		}
 		}
 	}
 	}