Skip to content

Commit

Permalink
Add views
Browse files Browse the repository at this point in the history
  • Loading branch information
gdalle committed Nov 8, 2024
1 parent 7fd1eaf commit 807330e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/decompression.jl
Original file line number Diff line number Diff line change
Expand Up @@ -684,10 +684,10 @@ function _join_compressed!(result::BicoloringResult, Br::AbstractMatrix, Bc::Abs
fill!(Br_and_Bc, zero(R))
for c in axes(Br_and_Bc, 2)
if haskey(row_color_ind, c) # some rows were colored with symmetric color c
@views copyto!(Br_and_Bc[1:n, c], Br[row_color_ind[c], :])
copyto!(view(Br_and_Bc, 1:n, c), view(Br, row_color_ind[c], :))
end
if haskey(col_color_ind, c) # some columns were colored with symmetric c
@views copyto!(Br_and_Bc[(n + 1):(n + m), c], Bc[:, col_color_ind[c]])
copyto!(view(Br_and_Bc, (n + 1):(n + m), c), view(Bc, :, col_color_ind[c]))
end
end
return Br_and_Bc
Expand Down
2 changes: 1 addition & 1 deletion src/interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ function coloring(
A
else
transpose(A)
end
end # TODO: fuse with next step?
A_and_Aᵀ = [
spzeros(T, n, n) SparseMatrixCSC(Aᵀ)
SparseMatrixCSC(A) spzeros(T, m, m)
Expand Down

0 comments on commit 807330e

Please sign in to comment.