Skip to content

Commit 2cfaf70

Browse files
committed
tests: Test cholesky is out-of-place
1 parent 9749b63 commit 2cfaf70

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/array/linalg/cholesky.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
A = rand(T, 128, 128)
99
A = A * A'
1010
A[diagind(A)] .+= size(A, 1)
11+
B = copy(A)
1112
DA = view(A, Blocks(32, 32))
1213
if !(T <: Complex)
1314
@test issymmetric(DA)
@@ -20,6 +21,8 @@
2021
@test chol_DA isa Cholesky
2122
@test chol_A.L chol_DA.L
2223
@test chol_A.U chol_DA.U
24+
# Check that cholesky did not modify A or DA
25+
@test A DA B
2326

2427
# In-place
2528
A_copy = copy(A)

0 commit comments

Comments
 (0)