Skip to content

Commit df4bc6a

Browse files
authored
Only check sparsity pattern equality when uplo == :F (#89)
1 parent ad84d15 commit df4bc6a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/decompression.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ function decompress!(
378378
) where {R<:Real}
379379
@compat (; S, color, star_set) = result
380380
@compat (; star, hub, spokes) = star_set
381-
check_same_pattern(A, S)
381+
uplo == :F && check_same_pattern(A, S)
382382
A .= zero(R)
383383
for i in axes(A, 1)
384384
if !iszero(S[i, i])
@@ -409,7 +409,7 @@ function decompress_single_color!(
409409
) where {R<:Real}
410410
@compat (; S, color, group, star_set) = result
411411
@compat (; hub, spokes) = star_set
412-
check_same_pattern(A, S)
412+
uplo == :F && check_same_pattern(A, S)
413413
for i in axes(A, 1)
414414
if !iszero(S[i, i]) && color[i] == c
415415
A[i, i] = b[i]
@@ -447,7 +447,7 @@ function decompress!(
447447
A::SparseMatrixCSC{R}, B::AbstractMatrix{R}, result::StarSetColoringResult, uplo::Symbol
448448
) where {R<:Real}
449449
@compat (; S, compressed_indices) = result
450-
check_same_pattern(A, S)
450+
uplo == :F && check_same_pattern(A, S)
451451
rvA = rowvals(A)
452452
nzA = nonzeros(A)
453453
for j in axes(S, 2)
@@ -472,7 +472,7 @@ function decompress!(
472472
uplo::Symbol=:F,
473473
) where {R<:Real}
474474
@compat (; S, color, vertices_by_tree, reverse_bfs_orders, buffer) = result
475-
check_same_pattern(A, S)
475+
uplo == :F && check_same_pattern(A, S)
476476
A .= zero(R)
477477

478478
if eltype(buffer) == R
@@ -519,7 +519,7 @@ function decompress!(
519519
@compat (;
520520
S, color, strict_upper_nonzero_inds, T_factorization, strict_upper_nonzeros_A
521521
) = result
522-
check_same_pattern(A, S)
522+
uplo == :F && check_same_pattern(A, S)
523523

524524
# TODO: for some reason I cannot use ldiv! with a sparse QR
525525
strict_upper_nonzeros_A = T_factorization \ vec(B)

0 commit comments

Comments
 (0)