Explorar o código

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

Samuel Thibault %!s(int64=12) %!d(string=hai) anos
pai
achega
06e0329e0b
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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;
 		}
 	}