Browse Source

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

Samuel Thibault 12 years ago
parent
commit
06e0329e0b
1 changed files with 2 additions and 0 deletions
  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 */
 			A[i + j*size] += (TYPE)(I*starpu_drand48());
 #endif
+			if (i == j)
+				A[i + j*size] *= 100;
 		}
 	}